wt.pds
Class AttributeMapInfo

java.lang.Object
  extended bywt.pds.AttributeMapInfo

public class AttributeMapInfo
extends Object

This class provides common access to the attribute column information associated with a class. Introspecion is used to build the information which is then cached for performance reasons.

An instance of this class is PDS specific. PDS specific calls are used when building attribute information. Each PDS class should contain a static instance of this class.

Supported API: false

Extendable: false


Field Summary
private static int ACCESS_CONTROL_INDEX
           
protected static boolean ACCESS_ENFORCE
           
private static Hashtable ACCESSCONTROL_ATTRIBUTEALIAS
           
private static String CLASSNAME
           
private static int CONTAIN_SEQUENCE_COLUMN_INDEX
           
private static DMLGenerator DMLGENERATOR
           
private static int INFO_SIZE
           
private static int INSERT_MAP_INDEX
           
private static int INSERT_STATEMENT_INDEX
           
private  Hashtable map
           
private  SQLDatabasePds pds
           
private static String RESOURCE
           
private static int SELECT_COLUMN_INDEX
           
private static int SELECT_MAP_INDEX
           
private static int UPDATE_MAP_INDEX
           
private static int UPDATE_STATEMENT_INDEX
           
private static int UPDATE_STATEMENT_N0_MODIFYSTAMP_INDEX
           
 
Constructor Summary
AttributeMapInfo()
           
 
Method Summary
private  void buildAccessControlMap(ClassInfo a_classInfo, Object[] a_info)
           
private  void buildInsertUpdateMap(ClassInfo a_classInfo, Object[] a_info)
           
private  void buildSelectMap(ClassInfo a_classInfo, Object[] a_info)
           
 boolean containSequenceColumn(ClassInfo a_classInfo)
          

Supported API: false
 ColumnBuilder[] getAccessControlColumnBuilders(ClassInfo a_classInfo)
          Return the Access Control ColumnBuilders for the specified class.
private  Object[] getAccessControlInfo(ClassInfo a_classInfo)
           
 Map getAttributeIndexMap(Class a_class)
          Return a Map of column names to indexes for a given class.
 Map getAttributeIndexMap(ClassInfo a_classInfo)
          Return a Map of column names to indexes for a given class.
 ColumnDescriptor[] getColumnDescriptors(Class a_class)
          Return the column descriptors for a given class.
 ColumnDescriptor[] getColumnDescriptors(ClassInfo a_classInfo)
          Return the column descriptors for a given class.
private  Object[] getInfo(ClassInfo a_classInfo)
           
 Map getInsertAttributeIndexMap(ClassInfo a_classInfo)
          Return a Map of column names to indexes for a given class.
 String getInsertStatement(ClassInfo a_classInfo)
          Return a SQL insert statement for the given class.
private  Object[] getInsertUpdateInfo(ClassInfo a_classInfo)
           
 SQLDatabasePds getPds()
          Gets the value of the attribute: pds.
private  Object[] getSelectInfo(ClassInfo a_classInfo)
           
 Map getUpdateAttributeIndexMap(ClassInfo a_classInfo)
          Return a Map of column names to indexes for a given class.
 String getUpdateStatement(ClassInfo a_classInfo, boolean a_changeModifyStamp)
          Return a SQL update statement for the given class.
private  void processAccessControlSurrogate(Class a_accessControlSurrogate, Map a_selectMap, ColumnDescriptor[] a_selectColumns, Object[] a_info)
           
 void setPds(SQLDatabasePds a_Pds)
          Sets the value of the attribute: pds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

map

private Hashtable map

pds

private SQLDatabasePds pds

SELECT_MAP_INDEX

private static final int SELECT_MAP_INDEX
See Also:
Constant Field Values

SELECT_COLUMN_INDEX

private static final int SELECT_COLUMN_INDEX
See Also:
Constant Field Values

UPDATE_MAP_INDEX

private static final int UPDATE_MAP_INDEX
See Also:
Constant Field Values

INSERT_MAP_INDEX

private static final int INSERT_MAP_INDEX
See Also:
Constant Field Values

ACCESS_CONTROL_INDEX

private static final int ACCESS_CONTROL_INDEX
See Also:
Constant Field Values

INSERT_STATEMENT_INDEX

private static final int INSERT_STATEMENT_INDEX
See Also:
Constant Field Values

UPDATE_STATEMENT_INDEX

private static final int UPDATE_STATEMENT_INDEX
See Also:
Constant Field Values

UPDATE_STATEMENT_N0_MODIFYSTAMP_INDEX

private static final int UPDATE_STATEMENT_N0_MODIFYSTAMP_INDEX
See Also:
Constant Field Values

CONTAIN_SEQUENCE_COLUMN_INDEX

private static final int CONTAIN_SEQUENCE_COLUMN_INDEX
See Also:
Constant Field Values

INFO_SIZE

private static final int INFO_SIZE
See Also:
Constant Field Values

ACCESS_ENFORCE

protected static boolean ACCESS_ENFORCE

ACCESSCONTROL_ATTRIBUTEALIAS

private static Hashtable ACCESSCONTROL_ATTRIBUTEALIAS

DMLGENERATOR

private static final DMLGenerator DMLGENERATOR
Constructor Detail

AttributeMapInfo

public AttributeMapInfo()
Method Detail

getPds

public SQLDatabasePds getPds()
Gets the value of the attribute: pds.

Supported API: false

Returns:
SQLDatabasePds

setPds

public void setPds(SQLDatabasePds a_Pds)
            throws WTPropertyVetoException
Sets the value of the attribute: pds.

Supported API: false

Parameters:
a_Pds -
Throws:
WTPropertyVetoException

getColumnDescriptors

public ColumnDescriptor[] getColumnDescriptors(ClassInfo a_classInfo)
                                        throws PersistenceException
Return the column descriptors for a given class.

Supported API: false

Parameters:
a_classInfo -
Returns:
ColumnDescriptor[]
Throws:
PersistenceException

getColumnDescriptors

public ColumnDescriptor[] getColumnDescriptors(Class a_class)
                                        throws PersistenceException
Return the column descriptors for a given class.

Supported API: false

Parameters:
a_class -
Returns:
ColumnDescriptor[]
Throws:
PersistenceException

getAttributeIndexMap

public Map getAttributeIndexMap(ClassInfo a_classInfo)
                         throws PersistenceException
Return a Map of column names to indexes for a given class.

Supported API: false

Parameters:
a_classInfo -
Returns:
Map
Throws:
PersistenceException

getAttributeIndexMap

public Map getAttributeIndexMap(Class a_class)
                         throws PersistenceException
Return a Map of column names to indexes for a given class.

Supported API: false

Parameters:
a_class -
Returns:
Map
Throws:
PersistenceException

getUpdateAttributeIndexMap

public Map getUpdateAttributeIndexMap(ClassInfo a_classInfo)
                               throws PersistenceException
Return a Map of column names to indexes for a given class. The column names are specific to update processing.

Supported API: false

Parameters:
a_classInfo -
Returns:
Map
Throws:
PersistenceException

getAccessControlColumnBuilders

public ColumnBuilder[] getAccessControlColumnBuilders(ClassInfo a_classInfo)
                                               throws PersistenceException
Return the Access Control ColumnBuilders for the specified class. Each class may contain only a subset of the columns in the Access Control Surrogate. This method returns an array of ColumnBuilders. If the target class does not contain a valid ColumnDescriptor for the Surrogate, then a NullColumnBuilder is used.

Supported API: false

Parameters:
a_classInfo -
Returns:
ColumnBuilder[]
Throws:
PersistenceException

getInsertAttributeIndexMap

public Map getInsertAttributeIndexMap(ClassInfo a_classInfo)
                               throws PersistenceException
Return a Map of column names to indexes for a given class. The column names are specific to update processing.

Supported API: false

Parameters:
a_classInfo -
Returns:
Map
Throws:
PersistenceException

getInsertStatement

public String getInsertStatement(ClassInfo a_classInfo)
                          throws PersistenceException
Return a SQL insert statement for the given class.

Supported API: false

Parameters:
a_classInfo -
Returns:
String
Throws:
PersistenceException

getUpdateStatement

public String getUpdateStatement(ClassInfo a_classInfo,
                                 boolean a_changeModifyStamp)
                          throws PersistenceException
Return a SQL update statement for the given class.

Supported API: false

Parameters:
a_classInfo -
a_changeModifyStamp - Indicates if the UPDATE statement should support changing the modify timestamp.
Returns:
String
Throws:
PersistenceException

containSequenceColumn

public boolean containSequenceColumn(ClassInfo a_classInfo)
                              throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
Returns:
boolean
Throws:
PersistenceException

getInfo

private Object[] getInfo(ClassInfo a_classInfo)
                  throws PersistenceException
Throws:
PersistenceException

getSelectInfo

private Object[] getSelectInfo(ClassInfo a_classInfo)
                        throws PersistenceException
Throws:
PersistenceException

getInsertUpdateInfo

private Object[] getInsertUpdateInfo(ClassInfo a_classInfo)
                              throws PersistenceException
Throws:
PersistenceException

getAccessControlInfo

private Object[] getAccessControlInfo(ClassInfo a_classInfo)
                               throws PersistenceException
Throws:
PersistenceException

buildSelectMap

private void buildSelectMap(ClassInfo a_classInfo,
                            Object[] a_info)
                     throws PersistenceException
Throws:
PersistenceException

buildInsertUpdateMap

private void buildInsertUpdateMap(ClassInfo a_classInfo,
                                  Object[] a_info)
                           throws PersistenceException
Throws:
PersistenceException

buildAccessControlMap

private void buildAccessControlMap(ClassInfo a_classInfo,
                                   Object[] a_info)
                            throws PersistenceException
Throws:
PersistenceException

processAccessControlSurrogate

private void processAccessControlSurrogate(Class a_accessControlSurrogate,
                                           Map a_selectMap,
                                           ColumnDescriptor[] a_selectColumns,
                                           Object[] a_info)
                                    throws WTException
Throws:
WTException