MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T > Class Reference
Inheritance diagram for com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >:
Collaboration diagram for com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >:

Public Member Functions

void registerPrimaryKeyColumn (DomainFieldHandler fmd, String columnName)
int[][] registerIndices (AbstractDomainFieldHandlerImpl fmd, String columnName)
Set< StringgetIndexNames (int[][] indexArray)
CandidateIndexImpl[] createCandidateIndexes ()
String getTableName ()
int getNumberOfFields ()
DomainFieldHandler[] getIdFieldHandlers ()
DomainFieldHandler getFieldHandler (String fieldName)
int getFieldNumber (String fieldName)
void operationSetNonPKValues (ValueHandler handler, Operation op)
void operationSetValues (ValueHandler handler, Operation op)
void operationSetModifiedNonPKValues (ValueHandler handler, Operation op)
void operationSetModifiedValues (ValueHandler handler, Operation op)
void operationSetKeys (ValueHandler handler, Operation op)
void operationGetValues (Operation op)
void operationGetValues (Operation op, BitSet fields)
void operationGetValuesExcept (IndexOperation op, String index)
void objectSetValues (ResultData rs, ValueHandler handler)
void objectSetValuesExcept (ResultData rs, ValueHandler handler, String indexName)
int[] getKeyFieldNumbers ()
Table getStoreTable ()
PartitionKey createPartitionKey (ValueHandler handler)
String getName ()
Set< StringgetColumnNames (BitSet fields)
Set
< com.mysql.clusterj.core.store.Column
getStoreColumns (BitSet fields)
ValueHandler createKeyValueHandler (Object keys)
getInstance (ValueHandler handler)
Class<?> getOidClass ()
Class< T > getProxyClass ()
ValueHandler getValueHandler (Object instance)
boolean isSupportedType ()
newInstance ()
void objectMarkModified (ValueHandler handler, String fieldName)
void objectResetModified (ValueHandler handler)
void objectSetCacheManager (CacheManager cm, Object instance)
String[] getFieldNames ()

Protected Member Functions

String[] getColumnNames (String indexName, Column[] columns)
Table getTable (Dictionary dictionary)
String removeUniqueSuffix (String indexName)

Protected Attributes

String name
String tableName
Table table
int numberOfIdFields
int[] idFieldNumbers
DomainFieldHandler[] idFieldHandlers
String[] primaryKeyColumnNames
int numberOfPartitionKeyColumns = 0
DomainFieldHandler[] partitionKeyFieldHandlers
String[] partitionKeyColumnNames
int numberOfFields = 0
List< DomainFieldHandlerpersistentFieldHandlers = new ArrayList<DomainFieldHandler>()
List< DomainFieldHandlernonPKFieldHandlers = new ArrayList<DomainFieldHandler>()
List< DomainFieldHandlerprimitiveFieldHandlers = new ArrayList<DomainFieldHandler>()
Map< String, Integer > fieldNameToNumber = new HashMap<String, Integer>()
String[] fieldNames
List< IndexHandlerImplindexHandlerImpls = new ArrayList<IndexHandlerImpl>()
Set< StringindexNames = new HashSet<String>()

Static Protected Attributes

static final I18NHelper local = I18NHelper.getInstance(AbstractDomainTypeHandlerImpl.class)
static final Logger logger = LoggerFactoryService.getFactory().getInstance(AbstractDomainTypeHandlerImpl.class)

Detailed Description

Abstract class implementing DomainTypeHandler. This class implements common behavior to manage persistent representations of tables, including field handlers for persistent field values. Subclasses will implement behavior specific to the actual representations of persistence.

Definition at line 52 of file AbstractDomainTypeHandlerImpl.java.

Member Function Documentation

CandidateIndexImpl [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.createCandidateIndexes ( )
inline

Create a list of candidate indexes to evaluate query terms and decide what type of operation to use. The result must correspond one to one with the indexHandlerImpls.

Returns
a new array of CandidateIndexImpl

Definition at line 217 of file AbstractDomainTypeHandlerImpl.java.

PartitionKey com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.createPartitionKey ( ValueHandler  handler)
inline

Create a partition key for a find by primary key.

Parameters
handlerthe handler that contains the values of the primary key

Definition at line 352 of file AbstractDomainTypeHandlerImpl.java.

String [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.getColumnNames ( String  indexName,
Column[]  columns 
)
inlineprotected

Extract the column names from store Columns.

Parameters
indexNamethe index name (for error messages)
columnsthe store Column instances
Returns
an array of column names

Definition at line 197 of file AbstractDomainTypeHandlerImpl.java.

Set<String> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.getIndexNames ( int  indexArray[][])
inline

Return the list of index names corresponding to the array of indexes. This method is called by the DomainFieldHandlerImpl constructor after the registerIndices method is called.

Parameters
indexArraythe result of registerIndices
Returns
all index names for the corresponding indexes

Definition at line 183 of file AbstractDomainTypeHandlerImpl.java.

int [][] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.registerIndices ( AbstractDomainFieldHandlerImpl  fmd,
String  columnName 
)
inline

Create and register an index from a field and return a special int[][] that contains all indexHandlerImpls in which the field participates. The int[][] is used by the query optimizer to determine which if any index can be used. This method is called by the DomainFieldHandlerImpl constructor after the mapped column name is known.

See Also
AbstractDomainFieldHandlerImpl::indices
Parameters
fmdthe FieldHandler
columnNamethe column name mapped to the field
Returns
the array of array identifying the indexes into the IndexHandler list and columns in the IndexHandler corresponding to the field

Definition at line 156 of file AbstractDomainTypeHandlerImpl.java.

Here is the call graph for this function:

void com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.registerPrimaryKeyColumn ( DomainFieldHandler  fmd,
String  columnName 
)
inline

Register a primary key column field. This is used to associate primary key and partition key column names with field handlers. This method is called by the DomainFieldHandlerImpl constructor after the mapped column name is known. It is only called by fields that are mapped to primary key columns.

Parameters
fmdthe field handler instance calling us
columnNamethe name of the column

Definition at line 126 of file AbstractDomainTypeHandlerImpl.java.

Member Data Documentation

String [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.fieldNames
protected

Field names

Definition at line 106 of file AbstractDomainTypeHandlerImpl.java.

Map<String, Integer> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.fieldNameToNumber = new HashMap<String, Integer>()
protected

Map of field names to field numbers.

Definition at line 103 of file AbstractDomainTypeHandlerImpl.java.

DomainFieldHandler [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.idFieldHandlers
protected

The id field(s) for the class, mapped to primary key columns

Definition at line 76 of file AbstractDomainTypeHandlerImpl.java.

int [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.idFieldNumbers
protected

The field numbers of the id fields.

Definition at line 73 of file AbstractDomainTypeHandlerImpl.java.

List<IndexHandlerImpl> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.indexHandlerImpls = new ArrayList<IndexHandlerImpl>()
protected

All index handlers defined for the mapped class. The position in this array is significant. Each DomainFieldHandlerImpl contains the index into this array and the index into the fields array within the IndexHandlerImpl.

Definition at line 113 of file AbstractDomainTypeHandlerImpl.java.

Set<String> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.indexNames = new HashSet<String>()
protected

Set of index names to check for duplicates.

Definition at line 116 of file AbstractDomainTypeHandlerImpl.java.

final I18NHelper com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.local = I18NHelper.getInstance(AbstractDomainTypeHandlerImpl.class)
staticprotected

My message translator

Definition at line 55 of file AbstractDomainTypeHandlerImpl.java.

final Logger com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.logger = LoggerFactoryService.getFactory().getInstance(AbstractDomainTypeHandlerImpl.class)
staticprotected

My logger

Definition at line 58 of file AbstractDomainTypeHandlerImpl.java.

String com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.name
protected

The name of the class.

Definition at line 61 of file AbstractDomainTypeHandlerImpl.java.

List<DomainFieldHandler> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.nonPKFieldHandlers = new ArrayList<DomainFieldHandler>()
protected

Non PK fields.

Definition at line 97 of file AbstractDomainTypeHandlerImpl.java.

int com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.numberOfFields = 0
protected

The number of fields. Dynamically created as fields are added.

Definition at line 91 of file AbstractDomainTypeHandlerImpl.java.

int com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.numberOfIdFields
protected

The number of id fields for the class.

Definition at line 70 of file AbstractDomainTypeHandlerImpl.java.

int com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.numberOfPartitionKeyColumns = 0
protected

The number of partition key columns

Definition at line 82 of file AbstractDomainTypeHandlerImpl.java.

String [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.partitionKeyColumnNames
protected

The names of the partition key columns

Definition at line 88 of file AbstractDomainTypeHandlerImpl.java.

DomainFieldHandler [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.partitionKeyFieldHandlers
protected

The partition key fields

Definition at line 85 of file AbstractDomainTypeHandlerImpl.java.

List<DomainFieldHandler> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.persistentFieldHandlers = new ArrayList<DomainFieldHandler>()
protected

Persistent fields.

Definition at line 94 of file AbstractDomainTypeHandlerImpl.java.

String [] com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.primaryKeyColumnNames
protected

The PrimaryKey column names.

Definition at line 79 of file AbstractDomainTypeHandlerImpl.java.

List<DomainFieldHandler> com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.primitiveFieldHandlers = new ArrayList<DomainFieldHandler>()
protected

Primitive fields.

Definition at line 100 of file AbstractDomainTypeHandlerImpl.java.

Table com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.table
protected

The NDB table for the class.

Definition at line 67 of file AbstractDomainTypeHandlerImpl.java.

String com.mysql.clusterj.core.metadata.AbstractDomainTypeHandlerImpl< T >.tableName
protected

The table for the class.

Definition at line 64 of file AbstractDomainTypeHandlerImpl.java.


The documentation for this class was generated from the following file: