Package com.oopsclick.silk.dbo
Class DataField
- java.lang.Object
- 
- com.oopsclick.silk.dbo.DataField
 
- 
 public class DataField extends java.lang.ObjectThe Class DataField is the object containing the basic information for the data operations.The data values are stored as Objects. These are convert to SQL data types before sending to the database. A data field is a place where you can store data. Commonly used to refer to a column in a database or a field in a data entry form or web form. The field may contain data to be entered as well as data to be displayed. - Author:
- Italo Osorio
 
- 
- 
Field SummaryFields Modifier and Type Field Description java.lang.StringcolumnStores the column name equivalent to the parameters expected to replace in the SQL command.intsecureStores the secure status determining if the stored value is encrypted and has to be decrypted before submission to the database.java.lang.Class<?>typeStores the final Class for the value object.java.lang.ObjectvalueStores the value as object.
 - 
Constructor SummaryConstructors Constructor Description DataField()Instantiates a new data value class.DataField(java.lang.String column, java.lang.Object value)Instantiates a new data value.DataField(java.lang.String column, java.lang.Object value, java.lang.Class<?> type)Instantiates a new data value.DataField(java.lang.String column, java.lang.Object value, java.lang.Class<?> type, int secure)Instantiates a new data value.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetColumn()Gets the column name.intgetSecure()Gets the secure status.java.lang.Class<?>getType()Gets the type class.java.lang.ObjectgetValue()Gets the value object.java.lang.StringgetValueToString()Gets the value object cast to a StringvoidsetColumn(java.lang.String column)Sets the column name.voidsetSecure(int secure)Sets the secure status.voidsetType(java.lang.Class<?> type)Sets the type class.voidsetValue(java.lang.Object value)Sets the value object.java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
columnpublic java.lang.String column Stores the column name equivalent to the parameters expected to replace in the SQL command. Usually a the column name will be the same as the database table column name
 - 
valuepublic java.lang.Object value Stores the value as object. This value will be cast to the SQL data type using the type property as the target class. Usually the value object has the same class as the type property. In cases like encrypted values the value object will store a String.class and later converted to the class store in the type property.
 - 
typepublic java.lang.Class<?> type Stores the final Class for the value object. This is use to convert the value object to SQL data types.
 - 
securepublic int secure Stores the secure status determining if the stored value is encrypted and has to be decrypted before submission to the database.
 
- 
 - 
Constructor Detail- 
DataFieldpublic DataField() Instantiates a new data value class.
 - 
DataFieldpublic DataField(java.lang.String column, java.lang.Object value)Instantiates a new data value.- Parameters:
- column- the column name
- value- the object value
 
 - 
DataFieldpublic DataField(java.lang.String column, java.lang.Object value, java.lang.Class<?> type)Instantiates a new data value.- Parameters:
- column- the column name
- value- the object value
- type- the class type
 
 - 
DataFieldpublic DataField(java.lang.String column, java.lang.Object value, java.lang.Class<?> type, int secure)Instantiates a new data value.- Parameters:
- column- the column name
- value- the object value
- type- the class type
- secure- the secure status
 
 
- 
 - 
Method Detail- 
getColumnpublic java.lang.String getColumn() Gets the column name.- Returns:
- the column name
 
 - 
setColumnpublic void setColumn(java.lang.String column) Sets the column name.- Parameters:
- column- the new column name
 
 - 
getValuepublic java.lang.Object getValue() Gets the value object.- Returns:
- the value
 
 - 
getValueToStringpublic java.lang.String getValueToString() Gets the value object cast to a String- Returns:
- the value object as String
 
 - 
setValuepublic void setValue(java.lang.Object value) Sets the value object.- Parameters:
- value- the new value
 
 - 
getTypepublic java.lang.Class<?> getType() Gets the type class.- Returns:
- the type class
 
 - 
setTypepublic void setType(java.lang.Class<?> type) Sets the type class.- Parameters:
- type- the new type class
 
 - 
getSecurepublic int getSecure() Gets the secure status.- Returns:
- the secure status
 
 - 
setSecurepublic void setSecure(int secure) Sets the secure status.- Parameters:
- secure- the new secure status
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-