org.datanucleus
Class ResourceType

java.lang.Object
  extended by org.datanucleus.ResourceType
All Implemented Interfaces:
java.io.Serializable

public class ResourceType
extends java.lang.Object
implements java.io.Serializable

Representation of a resource type. A Resource is a connection to the datastore. There are two kinds of resources: JTA or RESOURCE_LOCAL A transaction of a JTA resource is managed by a JTA TransactionManager, while RESOURCE_LOCAL is managed by JPOX TransactionManager

Since:
1.1
Version:
$Revision: 1.1 $
See Also:
Serialized Form

Field Summary
static ResourceType JTA
          JTA transaction.
static ResourceType RESOURCE_LOCAL
          Local transaction.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 int getType()
          Accessor to the sequence strategy type
static ResourceType getValue(java.lang.String value)
          Return Sequence strategy from String.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JTA

public static final ResourceType JTA
JTA transaction.


RESOURCE_LOCAL

public static final ResourceType RESOURCE_LOCAL
Local transaction.

Method Detail

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getType

public int getType()
Accessor to the sequence strategy type

Returns:
the type

getValue

public static ResourceType getValue(java.lang.String value)
Return Sequence strategy from String.

Parameters:
value - sequence strategy
Returns:
Instance of SequenceStrategy. If parse failed, return null.


Copyright © 2009. All Rights Reserved.