Adempiere 3.5.2a

org.compiere.model
Class MColumn

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_AD_Column
          extended by org.compiere.model.MColumn
All Implemented Interfaces:
Serializable, Comparator, I_AD_Column, I_Persistent, Evaluatee

public class MColumn
extends X_AD_Column

Persistent Column Model

Version:
$Id: MColumn.java,v 1.6 2006/08/09 05:23:49 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.model.X_AD_Column
AD_REFERENCE_ID_AD_Reference_ID, AD_REFERENCE_VALUE_ID_AD_Reference_ID, ENTITYTYPE_AD_Reference_ID, ISENCRYPTED_AD_Reference_ID, ISENCRYPTED_Encrypted, ISENCRYPTED_NotEncrypted
 
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Fields inherited from interface org.compiere.model.I_AD_Column
accessLevel, COLUMNNAME_AD_Column_ID, COLUMNNAME_AD_Element_ID, COLUMNNAME_AD_Process_ID, COLUMNNAME_AD_Reference_ID, COLUMNNAME_AD_Reference_Value_ID, COLUMNNAME_AD_Table_ID, COLUMNNAME_AD_Val_Rule_ID, COLUMNNAME_Callout, COLUMNNAME_ColumnName, COLUMNNAME_ColumnSQL, COLUMNNAME_DefaultValue, COLUMNNAME_Description, COLUMNNAME_EntityType, COLUMNNAME_FieldLength, COLUMNNAME_Help, COLUMNNAME_InfoFactoryClass, COLUMNNAME_IsAllowLogging, COLUMNNAME_IsAlwaysUpdateable, COLUMNNAME_IsAutocomplete, COLUMNNAME_IsEncrypted, COLUMNNAME_IsIdentifier, COLUMNNAME_IsKey, COLUMNNAME_IsMandatory, COLUMNNAME_IsParent, COLUMNNAME_IsSelectionColumn, COLUMNNAME_IsSyncDatabase, COLUMNNAME_IsTranslated, COLUMNNAME_IsUpdateable, COLUMNNAME_MandatoryLogic, COLUMNNAME_Name, COLUMNNAME_ReadOnlyLogic, COLUMNNAME_SeqNo, COLUMNNAME_ValueMax, COLUMNNAME_ValueMin, COLUMNNAME_Version, COLUMNNAME_VFormat, Model, Table_ID, Table_Name
 
Constructor Summary
MColumn(MTable parent)
          Parent Constructor
MColumn(Properties ctx, int AD_Column_ID, String trxName)
          Standard Constructor
MColumn(Properties ctx, ResultSet rs, String trxName)
          Load Constructor
 
Method Summary
protected  boolean afterSave(boolean newRecord, boolean success)
          After Save
protected  boolean beforeSave(boolean newRecord)
          Before Save
static MColumn get(Properties ctx, int AD_Column_ID)
          Get MColumn from Cache
static int getColumn_ID(String TableName, String columnName)
          get Column ID
static String getColumnName(Properties ctx, int AD_Column_ID)
          Get Column Name
 String getConstraint(String tableName)
          Get Table Constraint
 String getSQLAdd(MTable table)
          Get SQL Add command
 String getSQLDataType()
          Get SQL Data Type
 String getSQLDDL()
          Get SQL DDL
 String getSQLModify(MTable table, boolean setNullOption)
          Get SQL Modify command
static int getTable_ID(Properties ctx, int AD_Column_ID, String trxName)
          Get Table Id for a column
 boolean isEncrypted()
          Is the Column Encrypted?
 boolean isStandardColumn()
          Is Standard Column
 boolean isVirtualColumn()
          Is Virtual Column
 void setIsEncrypted(boolean IsEncrypted)
          Set Encrypted
 String toString()
          String Representation
 
Methods inherited from class org.compiere.model.X_AD_Column
get_AccessLevel, getAD_Column_ID, getAD_Element_ID, getAD_Element, getAD_Process_ID, getAD_Process, getAD_Reference_ID, getAD_Reference_Value_ID, getAD_Table_ID, getAD_Table, getAD_Val_Rule_ID, getAD_Val_Rule, getCallout, getColumnName, getColumnSQL, getDefaultValue, getDescription, getEntityType, getFieldLength, getHelp, getInfoFactoryClass, getIsEncrypted, getIsSyncDatabase, getKeyNamePair, getMandatoryLogic, getName, getReadOnlyLogic, getSeqNo, getValueMax, getValueMin, getVersion, getVFormat, initPO, isAllowLogging, isAlwaysUpdateable, isAutocomplete, isIdentifier, isKey, isMandatory, isParent, isSelectionColumn, isTranslated, isUpdateable, setAD_Column_ID, setAD_Element_ID, setAD_Process_ID, setAD_Reference_ID, setAD_Reference_Value_ID, setAD_Table_ID, setAD_Val_Rule_ID, setCallout, setColumnName, setColumnSQL, setDefaultValue, setDescription, setEntityType, setFieldLength, setHelp, setInfoFactoryClass, setIsAllowLogging, setIsAlwaysUpdateable, setIsAutocomplete, setIsEncrypted, setIsIdentifier, setIsKey, setIsMandatory, setIsParent, setIsSelectionColumn, setIsSyncDatabase, setIsTranslated, setIsUpdateable, setMandatoryLogic, setName, setReadOnlyLogic, setSeqNo, setValueMax, setValueMin, setVersion, setVFormat
 
Methods inherited from class org.compiere.model.PO
afterDelete, beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.compiere.model.I_Persistent
save
 

Constructor Detail

MColumn

public MColumn(Properties ctx,
               int AD_Column_ID,
               String trxName)
Standard Constructor

Parameters:
ctx - context
AD_Column_ID -
trxName - transaction

MColumn

public MColumn(Properties ctx,
               ResultSet rs,
               String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set
trxName - transaction

MColumn

public MColumn(MTable parent)
Parent Constructor

Parameters:
parent - table
Method Detail

get

public static MColumn get(Properties ctx,
                          int AD_Column_ID)
Get MColumn from Cache

Parameters:
ctx - context
AD_Column_ID - id
Returns:
MColumn

getColumnName

public static String getColumnName(Properties ctx,
                                   int AD_Column_ID)
Get Column Name

Parameters:
ctx - context
AD_Column_ID - id
Returns:
Column Name or null

isStandardColumn

public boolean isStandardColumn()
Is Standard Column

Returns:
true for AD_Client_ID, etc.

isVirtualColumn

public boolean isVirtualColumn()
Is Virtual Column

Returns:
true if virtual column

isEncrypted

public boolean isEncrypted()
Is the Column Encrypted?

Returns:
true if encrypted

setIsEncrypted

public void setIsEncrypted(boolean IsEncrypted)
Set Encrypted

Parameters:
IsEncrypted - encrypted

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
true

afterSave

protected boolean afterSave(boolean newRecord,
                            boolean success)
After Save

Overrides:
afterSave in class PO
Parameters:
newRecord - new
success - success
Returns:
success

getSQLAdd

public String getSQLAdd(MTable table)
Get SQL Add command

Parameters:
table - table
Returns:
sql

getSQLDDL

public String getSQLDDL()
Get SQL DDL

Returns:
columnName datataype ..

getSQLModify

public String getSQLModify(MTable table,
                           boolean setNullOption)
Get SQL Modify command

Parameters:
table - table
setNullOption - generate null / not null statement
Returns:
sql separated by ;

getSQLDataType

public String getSQLDataType()
Get SQL Data Type

Returns:
e.g. NVARCHAR2(60)

getConstraint

public String getConstraint(String tableName)
Get Table Constraint

Parameters:
tableName - table name
Returns:
table constraint

toString

public String toString()
String Representation

Overrides:
toString in class X_AD_Column
Returns:
info

getColumn_ID

public static int getColumn_ID(String TableName,
                               String columnName)
get Column ID

Parameters:
String - windowName
String - columnName
Returns:
int retValue

getTable_ID

public static int getTable_ID(Properties ctx,
                              int AD_Column_ID,
                              String trxName)
Get Table Id for a column

Parameters:
ctx - context
AD_Column_ID - id
trxName - transaction
Returns:
MColumn

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.