org.jpox.store
Interface DatastoreField

All Superinterfaces:
DatastoreObject
All Known Implementing Classes:
Column

public interface DatastoreField
extends DatastoreObject

Representation of a Java field in a datastore. In the case of RDBMS this will be a column. In the case of a file-based structure this may be a file. In the case of an XML-based structure this may be an node.

Version:
$Revision: 1.6 $

Method Summary
 java.lang.String applySelectFunction(java.lang.String replacementValue)
          Wraps the column name with a FUNCTION.
 void copyConfigurationTo(DatastoreField col)
          Copy the configuration of this field to another field
 DatastoreContainerObject getDatastoreContainerObject()
          Accessor for the DatastoreContainerObject container of this field
 ExtendableMetaData getExtendableMetaData()
          Access the metadata definition for this DatastoreField.
 JavaTypeMapping getMapping()
          Accessor for the Mapping for this field.
 java.lang.String getStoredJavaType()
          Accessor for the type of data stored in this field.
 boolean isNullable()
          Accessor for whether the field is nullable
 boolean isPrimaryKey()
          Accessor for whether the field is the primary key
 void setAsPrimaryKey()
          Mutator to make the field the primary key.
 DatastoreField setDefaultable()
          Mutator for the defaultability of the datastore field.
 DatastoreField setNullable()
          Mutator for the nullability of the datastore field.
 
Methods inherited from interface org.jpox.store.DatastoreObject
getIdentifier, getStoreManager
 

Method Detail

getStoredJavaType

public java.lang.String getStoredJavaType()
Accessor for the type of data stored in this field.

Returns:
The type of data in the field.

setAsPrimaryKey

public void setAsPrimaryKey()
Mutator to make the field the primary key.


isPrimaryKey

public boolean isPrimaryKey()
Accessor for whether the field is the primary key

Returns:
whether the field is (part of) the primary key

isNullable

public boolean isNullable()
Accessor for whether the field is nullable

Returns:
whether the field is nullable

getMapping

public JavaTypeMapping getMapping()
Accessor for the Mapping for this field.

Returns:
The Mapping

getDatastoreContainerObject

public DatastoreContainerObject getDatastoreContainerObject()
Accessor for the DatastoreContainerObject container of this field

Returns:
The DatastoreContainerObject

applySelectFunction

public java.lang.String applySelectFunction(java.lang.String replacementValue)
Wraps the column name with a FUNCTION.
example: SQRT(?) generates: SQRT(columnName)

Parameters:
replacementValue - the replacement to ?. Probably it's a column name, that may be fully qualified name or not
Returns:
a String with function taking as parameter the replacementValue

copyConfigurationTo

public void copyConfigurationTo(DatastoreField col)
Copy the configuration of this field to another field

Parameters:
col - the datastore field

setNullable

public DatastoreField setNullable()
Mutator for the nullability of the datastore field.

Returns:
The datastore field with the updated info

setDefaultable

public DatastoreField setDefaultable()
Mutator for the defaultability of the datastore field.

Returns:
The datastore field with the updated info

getExtendableMetaData

public ExtendableMetaData getExtendableMetaData()
Access the metadata definition for this DatastoreField. For RDBMS mapping it will return an instance of ColumnMetaData

Returns:
the ExtendableMetaData


Copyright © -2007 . All Rights Reserved.