|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.StatementMappingIndex
public class StatementMappingIndex
Representation of a mapping in a statement (such as JDBC), and its mapping to the associated column(s) or parameters that the mapping relates to. The mapping may be for a field of a class (whether it is a real field or a surrogate), or for a parameter.
CLASS FIELDNUM MAPPING TABLE COLUMN POSITIONS
----------------- -------- -------------- ---------------- ----------------
class A --> --> --> TABLE_A
{
short fieldA; --> 1 --> ShortMapping --> COL_FIELDA --> 1
String fieldB; --> 2 --> StringMapping --> COL_FIELDB_PART1 --> 2
--> --> --> COL_FIELDB_PART2 --> 3
...
}
| Constructor Summary | |
|---|---|
StatementMappingIndex(JavaTypeMapping mapping)
|
|
| Method Summary | |
|---|---|
void |
addParameterOccurrence(int[] positions)
Method to register statement position(s) that this mapping is used as a parameter. |
String |
getColumnAlias()
Accessor for the column name alias (if any). |
int[] |
getColumnPositions()
Accessor for the column position(s). |
JavaTypeMapping |
getMapping()
|
int |
getNumberOfParameterOccurrences()
Accessor for the number of times this mapping is used as a parameter. |
int[] |
getParameterPositionsForOccurrence(int num)
Accessor for the parameter positions for this occurrence of use of the mapping as a parameter. |
void |
removeParameterOccurrence(int[] positions)
Method to deregister statement positions that this mapping is used as a parameter. |
void |
setColumnAlias(String alias)
Mutator for the column name (alias). |
void |
setColumnPositions(int[] pos)
Mutator for the column positions in the result clause of a statement. |
void |
setMapping(JavaTypeMapping mapping)
|
String |
toString()
Method to return a string version of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StatementMappingIndex(JavaTypeMapping mapping)
| Method Detail |
|---|
public JavaTypeMapping getMapping()
public void setMapping(JavaTypeMapping mapping)
public String getColumnAlias()
public void setColumnAlias(String alias)
alias - The name of the column (alias).public int[] getColumnPositions()
public void setColumnPositions(int[] pos)
pos - The column position(s)public void addParameterOccurrence(int[] positions)
positions - The parameter positions in the statement.public void removeParameterOccurrence(int[] positions)
positions - The param positions to deregisterpublic int getNumberOfParameterOccurrences()
public int[] getParameterPositionsForOccurrence(int num)
num - The occurrence of using this mapping as a parameter.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||