public class VMMDataMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALN
ALN data type.
|
static int |
CRYPTO
Password field
|
static int |
INTEGER
INTEGER data type.
|
static int |
LOWER
LOWER case ALN data tpe.
|
static int |
UPPER
UPPER case ALN data type.
|
static int |
YORN
Boolean data type represented as 1 or 0.
|
Constructor and Description |
---|
VMMDataMap() |
Modifier and Type | Method and Description |
---|---|
void |
addDataMap(java.lang.String tableId,
java.lang.String table,
java.lang.String column,
java.lang.String attribute,
boolean keyColumn,
boolean required,
boolean allowRecDelete,
java.lang.String type)
Adds the data mapping information to the appropriate
internal data structures.
|
boolean |
allowRecDelete(java.lang.String tableId)
Returns whether the table row is allowed to be deleted or not
when the required information is not available in VMM Server.
|
java.lang.String |
getAttribute(java.lang.String tableId,
java.lang.String column)
Returns the attribute that's mapped to the given table column.
|
java.lang.String |
getColumnNameForAttribute(java.lang.String tableId,
java.lang.String attributeName)
Get the column name for the given attribute name.
|
java.util.Iterator |
getColumnNames(java.lang.String tableId)
Returns an iterator to iterate over list of columns
for the given table id.
|
java.util.Iterator |
getKeyColumnNames(java.lang.String tableId)
Returns an iterator to iterate over list of key columns
for the given table id.
|
java.lang.String |
getObjectName(java.lang.String tableId,
java.sql.Connection con)
Returns object name for a given table id.
|
java.lang.String |
getTableId(java.lang.String objectName)
Returns Table ID for a given object name.
|
java.util.Iterator |
getTableIds()
Returns an iterator to iterate the table ids
|
java.lang.String |
getTableName(java.lang.String tableId)
Returns table name for a given table id.
|
java.lang.String |
getType(java.lang.String tableId,
java.lang.String column)
Returns data type of the column.
|
int |
getTypeAsInt(java.lang.String tableId,
java.lang.String column)
Returns data type of the column as an integer value.
|
java.lang.String[] |
getVMMAttributes()
Returns list of configured VMM attributes.
|
boolean |
isMappedToVMMAttribute(java.lang.String tableId,
java.lang.String column)
Returns whether the given column is mapped to an VMM attribute
or not.
|
boolean |
isRequired(java.lang.String tableId,
java.lang.String column)
Returns whether the given column is required or not.
|
boolean |
isSysDateColumn(java.lang.String tableId,
java.lang.String column)
Returns whether the column is configured to have system date
when adding records.
|
boolean |
isUniqueIdColumn(java.lang.String tableId,
java.lang.String column)
Returns whether the column is configured to have unique
id generated when adding records.
|
java.lang.String |
toString()
Returns a string representation of the data for debug purpose.
|
public static final int ALN
public static final int UPPER
public static final int LOWER
public static final int INTEGER
public static final int YORN
public static final int CRYPTO
public void addDataMap(java.lang.String tableId, java.lang.String table, java.lang.String column, java.lang.String attribute, boolean keyColumn, boolean required, boolean allowRecDelete, java.lang.String type)
tableId
- table idtable
- name of database tablecolumn
- name of database columnattribute
- VMM attribute to be usedkeyColumn
- indicates whether this is a key column or notrequired
- indicates whether a value is a required or notallowRecDelete
- indicates whether a record should be delete or not
when the required columns do not have data.public java.lang.String getTableName(java.lang.String tableId)
tableId
- table id for which table name is needed.public java.lang.String getTableId(java.lang.String objectName)
objectName
- Object name for which table ID is needed.public java.lang.String getObjectName(java.lang.String tableId, java.sql.Connection con)
tableId
- table id for which object name is needed.public boolean allowRecDelete(java.lang.String tableId)
tableId
- tableId table id for which the information is needed.public java.util.Iterator getTableIds()
public boolean isUniqueIdColumn(java.lang.String tableId, java.lang.String column)
tableId
- table idcolumn
- column namepublic boolean isSysDateColumn(java.lang.String tableId, java.lang.String column)
tableId
- table idcolumn
- column namepublic java.util.Iterator getColumnNames(java.lang.String tableId)
tableId
- table id.public java.util.Iterator getKeyColumnNames(java.lang.String tableId)
tableId
- table id.public java.lang.String getColumnNameForAttribute(java.lang.String tableId, java.lang.String attributeName)
public boolean isMappedToVMMAttribute(java.lang.String tableId, java.lang.String column)
tableId
- table id.column
- column namepublic java.lang.String getAttribute(java.lang.String tableId, java.lang.String column)
tableId
- table id.column
- column name, e.g. 'personid'public boolean isRequired(java.lang.String tableId, java.lang.String column)
tableId
- table id.column
- column namepublic java.lang.String getType(java.lang.String tableId, java.lang.String column)
tableId
- table id.column
- column namepublic int getTypeAsInt(java.lang.String tableId, java.lang.String column)
tableId
- table id.column
- column namepublic java.lang.String[] getVMMAttributes()
public java.lang.String toString()
toString
in class java.lang.Object