Produced by Siminov Software Solution LLP

siminov.orm.model
Class DatabaseMappingDescriptor.Column

java.lang.Object
  extended by siminov.orm.model.DatabaseMappingDescriptor.Column
Enclosing class:
DatabaseMappingDescriptor

public static class DatabaseMappingDescriptor.Column
extends java.lang.Object

Exposes methods to GET and SET Column information as per define in DatabaseMappingDescriptor.si.xml file by application.


Example:
        <database-mapping>

                <table table_name="LIQUOR" class_name="siminov.orm.template.model.Liquor">

                        <column variable_name="liquorType" column_name="LIQUOR_TYPE">
                                <property name="type">TEXT</property>
                                <property name="primary_key">true</property>
                                <property name="not_null">true</property>
                                <property name="unique">true</property>
                        </column>		

        </database-mapping>
        

                


Constructor Summary
DatabaseMappingDescriptor.Column()
           
 
Method Summary
 void addProperty(java.lang.String name, java.lang.String value)
          Add Property in property pool.
 boolean containProperty(java.lang.String name)
          Check whether Property exist or not.
 java.lang.String getCheck()
          Get check constraint of column.
 java.lang.String getColumnName()
          Get column name.
 java.lang.String getDefaultValue()
          Get default value of column.
 java.lang.String getGetterMethodName()
          Get POJO class column getter method name.
 java.util.Iterator<java.lang.String> getProperties()
          Get all Properties defined in descriptor.
 java.lang.String getProperty(java.lang.String name)
          Get Property based on name provided.
 java.lang.String getSetterMethodName()
          Get POJO class column setter method name.
 java.lang.String getType()
          Get type of column.
 java.lang.String getVariableName()
          Get variable name.
 boolean isNotNull()
          Check whether column value can be not or not.
 boolean isPrimaryKey()
          Check whether column is primary key.
 boolean isUnique()
          Check whether column is unique or not.
 void removeProperty(java.lang.String name)
          Remove Property from property pool.
 void setCheck(java.lang.String check)
          Set check constraint of column as per defined in DatabaseMapping.core.xml file.
 void setColumnName(java.lang.String columnName)
          Set column name as per defined in DatabaseMapping.core.xml file.
 void setDefaultValue(java.lang.String defaultValue)
          Set default value of column as per defined in DatabaseMapping.core.xml file.
 void setGetterMethodName(java.lang.String getMethodName)
          Set POJO class column getter method name.
 void setNotNull(boolean isNotNull)
          Set whether column can be null or not.
 void setPrimaryKey(boolean primaryKey)
          Set column as primary key or not.
 void setSetterMethodName(java.lang.String setMethodName)
          Set POJO class column setter method name.
 void setType(java.lang.String type)
          Set type of column as per defined in DatabaseMapping.core.xml file.
 void setUnique(boolean isUnique)
          Set whether column is unique or not.
 void setVariableName(java.lang.String variableName)
          Set variable name as per defined in DatabaseMapping.core.xml file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseMappingDescriptor.Column

public DatabaseMappingDescriptor.Column()
Method Detail

getVariableName

public java.lang.String getVariableName()
Get variable name.

Returns:

setVariableName

public void setVariableName(java.lang.String variableName)
Set variable name as per defined in DatabaseMapping.core.xml file.

Parameters:
variableName - Name of variable.

getColumnName

public java.lang.String getColumnName()
Get column name.

Returns:
Name Of Column.

setColumnName

public void setColumnName(java.lang.String columnName)
Set column name as per defined in DatabaseMapping.core.xml file.

Parameters:
columnName - Name of column name.

getType

public java.lang.String getType()
Get type of column.

Returns:
Type of column.

setType

public void setType(java.lang.String type)
Set type of column as per defined in DatabaseMapping.core.xml file.

Parameters:
type - Type of column.

getGetterMethodName

public java.lang.String getGetterMethodName()
Get POJO class column getter method name.

Returns:
POJO class column getter method name.

setGetterMethodName

public void setGetterMethodName(java.lang.String getMethodName)
Set POJO class column getter method name.

Parameters:
getMethodName - POJO class coumn getter method name.

getSetterMethodName

public java.lang.String getSetterMethodName()
Get POJO class column setter method name.

Returns:
POJO class column setter method name.

setSetterMethodName

public void setSetterMethodName(java.lang.String setMethodName)
Set POJO class column setter method name.

Parameters:
setMethodName - POJO class column setter method name.

getDefaultValue

public java.lang.String getDefaultValue()
Get default value of column.

Returns:
Default value of column.

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Set default value of column as per defined in DatabaseMapping.core.xml file.

Parameters:
defaultValue - Default value of column.

getCheck

public java.lang.String getCheck()
Get check constraint of column.

Returns:
Check constraint of column.

setCheck

public void setCheck(java.lang.String check)
Set check constraint of column as per defined in DatabaseMapping.core.xml file.

Parameters:
check - Check constraint.

isPrimaryKey

public boolean isPrimaryKey()
Check whether column is primary key.

Returns:
TRUE: If column is primary key, FALSE: If column is not primary key.

setPrimaryKey

public void setPrimaryKey(boolean primaryKey)
Set column as primary key or not.

Parameters:
primaryKey - TRUE: If column is primary key, FALSE: If column is not primary key.

isUnique

public boolean isUnique()
Check whether column is unique or not.

Returns:
TRUE: If column is unique, FALSE: If column is not unique.

setUnique

public void setUnique(boolean isUnique)
Set whether column is unique or not.

Parameters:
isUnique - TRUE: If column is unique, FALSE: If column is not unique

isNotNull

public boolean isNotNull()
Check whether column value can be not or not.

Returns:
TRUE: If column value can be null, FALSE: If column value can not be null.

setNotNull

public void setNotNull(boolean isNotNull)
Set whether column can be null or not.

Parameters:
isNotNull - TRUE: If column value can be null, FALSE: If column value can not be null.

getProperties

public java.util.Iterator<java.lang.String> getProperties()
Get all Properties defined in descriptor.

Returns:
All Property Values.

getProperty

public java.lang.String getProperty(java.lang.String name)
Get Property based on name provided.

Parameters:
name - Name of Property.
Returns:
Property value.

containProperty

public boolean containProperty(java.lang.String name)
Check whether Property exist or not.

Parameters:
name - Name of Property.
Returns:
true/false, TRUE if property exist, FALSE if property does not exist.

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Add Property in property pool.

Parameters:
name - Name of Property.
value - value of Property.

removeProperty

public void removeProperty(java.lang.String name)
Remove Property from property pool.

Parameters:
name - Name of Property.

Apache License 2.0

Copyright 2013