org.datanucleus.store.mapped.mapping
Interface DatastoreMapping

All Known Implementing Classes:
AbstractDatastoreMapping

public interface DatastoreMapping

Representation of the mapping of a datastore type.


Method Summary
 boolean getBoolean(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 byte getByte(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 char getChar(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 DatastoreField getDatastoreField()
          The datastore field mapped.
 double getDouble(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 float getFloat(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 int getInt(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 JavaTypeMapping getJavaTypeMapping()
          The mapping for the java type that this datastore mapping is used by.
 long getLong(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 java.lang.Object getObject(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 short getShort(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 java.lang.String getString(java.lang.Object resultSet, int exprIndex)
          Obtains a value from resultSet at position specified by exprIndex.
 boolean isBitBased()
          Accessor for whether the mapping is bit-based.
 boolean isBooleanBased()
          Accessor for whether the mapping is boolean-based.
 boolean isDecimalBased()
          Accessor for whether the mapping is decimal-based.
 boolean isIntegerBased()
          Accessor for whether the mapping is integer-based.
 boolean isNullable()
          Whether the field mapped is nullable.
 boolean isStringBased()
          Accessor for whether the mapping is string-based.
 void setBoolean(java.lang.Object preparedStatement, int paramIndex, boolean value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setByte(java.lang.Object preparedStatement, int paramIndex, byte value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setChar(java.lang.Object preparedStatement, int paramIndex, char value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setDouble(java.lang.Object preparedStatement, int paramIndex, double value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setFloat(java.lang.Object preparedStatement, int paramIndex, float value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setInt(java.lang.Object preparedStatement, int paramIndex, int value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setLong(java.lang.Object preparedStatement, int paramIndex, long value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setObject(java.lang.Object preparedStatement, int paramIndex, java.lang.Object value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setShort(java.lang.Object preparedStatement, int paramIndex, short value)
          Sets a value into preparedStatement at position specified by paramIndex.
 void setString(java.lang.Object preparedStatement, int paramIndex, java.lang.String value)
          Sets a value into preparedStatement at position specified by paramIndex.
 

Method Detail

isNullable

boolean isNullable()
Whether the field mapped is nullable.

Returns:
true if is nullable

getDatastoreField

DatastoreField getDatastoreField()
The datastore field mapped.

Returns:
the DatastoreField

getJavaTypeMapping

JavaTypeMapping getJavaTypeMapping()
The mapping for the java type that this datastore mapping is used by. This will return null if this simply maps a datastore field in the datastore and has no associated java type in a class.

Returns:
the JavaTypeMapping

isDecimalBased

boolean isDecimalBased()
Accessor for whether the mapping is decimal-based.

Returns:
Whether the mapping is decimal based

isIntegerBased

boolean isIntegerBased()
Accessor for whether the mapping is integer-based.

Returns:
Whether the mapping is integer based

isStringBased

boolean isStringBased()
Accessor for whether the mapping is string-based.

Returns:
Whether the mapping is string based

isBitBased

boolean isBitBased()
Accessor for whether the mapping is bit-based.

Returns:
Whether the mapping is bit based

isBooleanBased

boolean isBooleanBased()
Accessor for whether the mapping is boolean-based.

Returns:
Whether the mapping is boolean based

setBoolean

void setBoolean(java.lang.Object preparedStatement,
                int paramIndex,
                boolean value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setChar

void setChar(java.lang.Object preparedStatement,
             int paramIndex,
             char value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setByte

void setByte(java.lang.Object preparedStatement,
             int paramIndex,
             byte value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setShort

void setShort(java.lang.Object preparedStatement,
              int paramIndex,
              short value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setInt

void setInt(java.lang.Object preparedStatement,
            int paramIndex,
            int value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setLong

void setLong(java.lang.Object preparedStatement,
             int paramIndex,
             long value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setFloat

void setFloat(java.lang.Object preparedStatement,
              int paramIndex,
              float value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setDouble

void setDouble(java.lang.Object preparedStatement,
               int paramIndex,
               double value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setString

void setString(java.lang.Object preparedStatement,
               int paramIndex,
               java.lang.String value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

setObject

void setObject(java.lang.Object preparedStatement,
               int paramIndex,
               java.lang.Object value)
Sets a value into preparedStatement at position specified by paramIndex.

Parameters:
preparedStatement - a datastore object that executes statements in the database
paramIndex - the position of the value in the statement
value - the value

getBoolean

boolean getBoolean(java.lang.Object resultSet,
                   int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getChar

char getChar(java.lang.Object resultSet,
             int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getByte

byte getByte(java.lang.Object resultSet,
             int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getShort

short getShort(java.lang.Object resultSet,
               int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getInt

int getInt(java.lang.Object resultSet,
           int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getLong

long getLong(java.lang.Object resultSet,
             int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getFloat

float getFloat(java.lang.Object resultSet,
               int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getDouble

double getDouble(java.lang.Object resultSet,
                 int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getString

java.lang.String getString(java.lang.Object resultSet,
                           int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value

getObject

java.lang.Object getObject(java.lang.Object resultSet,
                           int exprIndex)
Obtains a value from resultSet at position specified by exprIndex.

Parameters:
resultSet - an object returned from the datastore with values
exprIndex - the position of the value in the result
Returns:
the value


Copyright © 2011. All Rights Reserved.