Class FieldDesc
- java.lang.Object
-
- com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ForeignFieldDesc
,LocalFieldDesc
public abstract class FieldDesc extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
absoluteID
protected ClassDesc
classDesc
Back pointer to declaring class descriptor.int
concurrencyGroup
int
fetchGroup
static int
GROUP_DEFAULT
static int
GROUP_NONE
protected static Logger
logger
The logger.protected static ResourceBundle
messages
I18N message handler.static int
PROP_FOREIGN_KEY_FIELD
This field is part of a foreign key.static int
PROP_IN_CONCURRENCY_CHECK
This field is used for concurrency checkstatic int
PROP_LOG_ON_UPDATE
Update before image when this field is updated.static int
PROP_PRIMARY_KEY_FIELD
This field is part of a primary key.static int
PROP_PRIMARY_TRACKED_FIELD
This field is the primary tracked field.static int
PROP_READ_ONLY
This field is read onlystatic int
PROP_RECORD_ON_UPDATE
Record updates on this field to DB.static int
PROP_REF_INTEGRITY_UPDATES
Relationship updates are processed from the side containing this field.static int
PROP_SECONDARY_TRACKED_FIELD
This field is a secondary tracked field.static int
PROP_TRACK_RELATIONSHIP_FIELD
This field tracks a relationship field.static int
PROP_VERSION_FIELD
This field is used for version consistency validation.int
sqlProperties
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTrackedField(FieldDesc f)
Object
convertValue(Object value, StateManager sm)
Object
createSCO(Object value, StateManager sm)
Creates a new SCO instance.static Character
getCharFromString(String str)
Class
getComponentType()
Class
getDeclaringClass()
int
getEnumType()
String
getName()
ArrayList
getTrackedFields()
Class
getType()
Object
getValue(StateManager sm)
boolean
isForeignKeyField()
Returns true if this field is a foreign key field.boolean
isKeyField()
Returns true if this field is a primary key field.boolean
isRelationshipField()
Returns true if this field is a relationship field.protected void
setupDesc(Field f)
void
setValue(StateManager sm, Object value)
String
toString()
-
-
-
Field Detail
-
GROUP_DEFAULT
public static final int GROUP_DEFAULT
- See Also:
- Constant Field Values
-
GROUP_NONE
public static final int GROUP_NONE
- See Also:
- Constant Field Values
-
PROP_IN_CONCURRENCY_CHECK
public static final int PROP_IN_CONCURRENCY_CHECK
This field is used for concurrency check- See Also:
- Constant Field Values
-
PROP_LOG_ON_UPDATE
public static final int PROP_LOG_ON_UPDATE
Update before image when this field is updated. This property is always set- See Also:
- Constant Field Values
-
PROP_READ_ONLY
public static final int PROP_READ_ONLY
This field is read only- See Also:
- Constant Field Values
-
PROP_RECORD_ON_UPDATE
public static final int PROP_RECORD_ON_UPDATE
Record updates on this field to DB. This property is always set for primitive fields.- See Also:
- Constant Field Values
-
PROP_REF_INTEGRITY_UPDATES
public static final int PROP_REF_INTEGRITY_UPDATES
Relationship updates are processed from the side containing this field.- See Also:
- Constant Field Values
-
PROP_PRIMARY_TRACKED_FIELD
public static final int PROP_PRIMARY_TRACKED_FIELD
This field is the primary tracked field.Primitive fields track each other if they are mapped to same columns. One of them is made the primary tracked field as per precedence rules on the field types. This field is used to bind values to columns while updating the database.
RESOLVE: Investigate the runtime behaviour for relationship fields marked primary.
-
PROP_SECONDARY_TRACKED_FIELD
public static final int PROP_SECONDARY_TRACKED_FIELD
This field is a secondary tracked field.Seconday tracked primitive fields are not used for updates to the database or for concurrency checking.
RESOLVE: Investigate the runtime behaviour for secondary tracked relationship fields.
-
PROP_TRACK_RELATIONSHIP_FIELD
public static final int PROP_TRACK_RELATIONSHIP_FIELD
This field tracks a relationship field. Only primitive fields can have this property set.- See Also:
- Constant Field Values
-
PROP_PRIMARY_KEY_FIELD
public static final int PROP_PRIMARY_KEY_FIELD
This field is part of a primary key.- See Also:
- Constant Field Values
-
PROP_VERSION_FIELD
public static final int PROP_VERSION_FIELD
This field is used for version consistency validation.- See Also:
- Constant Field Values
-
PROP_FOREIGN_KEY_FIELD
public static final int PROP_FOREIGN_KEY_FIELD
This field is part of a foreign key.- See Also:
- Constant Field Values
-
absoluteID
public int absoluteID
-
fetchGroup
public int fetchGroup
-
concurrencyGroup
public int concurrencyGroup
-
sqlProperties
public int sqlProperties
-
classDesc
protected final ClassDesc classDesc
Back pointer to declaring class descriptor.
-
logger
protected static final Logger logger
The logger.
-
messages
protected static final ResourceBundle messages
I18N message handler.
-
-
Method Detail
-
getComponentType
public Class getComponentType()
-
getDeclaringClass
public Class getDeclaringClass()
-
getType
public Class getType()
-
getEnumType
public int getEnumType()
-
getName
public String getName()
-
getValue
public Object getValue(StateManager sm)
-
setValue
public void setValue(StateManager sm, Object value)
-
getTrackedFields
public ArrayList getTrackedFields()
-
isKeyField
public boolean isKeyField()
Returns true if this field is a primary key field.
-
isForeignKeyField
public boolean isForeignKeyField()
Returns true if this field is a foreign key field.
-
isRelationshipField
public boolean isRelationshipField()
Returns true if this field is a relationship field.
-
convertValue
public Object convertValue(Object value, StateManager sm)
-
createSCO
public Object createSCO(Object value, StateManager sm)
Creates a new SCO instance. Therefore checks if PersistenceManager settings require SCO creation. SCOs will typically be created in a non managed environment.- Parameters:
value
- Value being converted.sm
- StateManager of the persistent object being bound.- Returns:
- New SCO instance according to
enumFieldType
of this field. Returns null if no SCO was created.
-
setupDesc
protected void setupDesc(Field f)
-
addTrackedField
protected void addTrackedField(FieldDesc f)
-
-