Java Doc for Record.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » ODAL » com.completex.objective.components.persistency 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.completex.objective.components.persistency.Record

Record
public class Record implements Cloneable(Code)
Representation of linked table structure. Each record is mapped to database table and optionally has links to another records.
author:
   Gennady Krizhevsky

Inner Class :public static interface ToParametersPolicy
Inner Class :public static class DefaultToParametersPolicy implements ToParametersPolicy
Inner Class :public static class NotNullToParametersPolicy extends DefaultToParametersPolicy

Field Summary
final public static  DefaultToParametersPolicyDEFAULT_TO_PARAMETERS_POLICY
    
final public static  byte[]EMPTY_BYTE_ARRAY
    
final public static  NotNullToParametersPolicyNOT_NULL_TO_PARAMETERS_POLICY
    
final static  longserialVersionUID
    

Constructor Summary
public  Record(MetaTable table)
    
public  Record(MetaTable table, boolean skipInsertForKeysOnly)
    
public  Record(MetaTable table, boolean skipInsertForKeysOnly, boolean autoPadChars)
    

Method Summary
public  voidaddChild(Link link)
    
public  voidaddPersistentEntry(PersistentEntry entry)
    
public  voidaddPersistentEntry(String newColumnName, PersistentEntry entry)
    
protected  voidaddPersistentEntry(String newColumnName, PersistentEntry entry, boolean cloneEntry)
    
 voidassemble(AbstractPersistentObject persistentObject)
    
public  voidclearNonInlinedChildren()
    
public  Objectclone()
    
public  booleancomplexDirty()
     Traverses through of child objects of parent persistent object of this record and returns true if at least one of them is dirty.
public  voidcopy(Record source, Set updateableFields, boolean dirtyFieldsOnly)
     Copies updateable fields from source record to this record.
 voidcopy(Record source, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)
     Copies updateable fields from source record to this record.
public  voidcopyDirty(Record source, Set updateableFields)
     Copies only dirty and updateable fields from source record to this record.
 voidcopyPreseveStates(Record source, Set updateableFields, boolean dirtyFieldsOnly)
     Copies updateable fields from source record to this record.
 voidcopyPreseveStates(Record source)
     Copies all fields from source record to this record.
protected  booleandifferent(Object before, Object after)
    
public static  booleandifferent(Record record, Object before, Object after)
    
public  booleanequalsByValues(Record thatRecord)
    
public  booleanfieldsEqual(Record record)
     Compares field values of this record to another one passed as parameter.
public  BooleangetBoolean(String columnName)
    
public  BooleangetBoolean(int index)
    
public  LinkgetChild(String name)
    
public  ObjectgetChildObject(String name)
    
protected  ObjectgetChildObjectStraight(String name)
    
public  MetaColumngetColumn(String columnKey)
    
public  MetaColumngetColumn(int columnIndex)
    
public  StringgetColumnAlias(String columnKey)
    
public  StringgetColumnAlias(int columnIndex)
    
public  intgetColumnCount()
    
public  StringgetColumnName(String columnKey)
    
public  StringgetColumnName(int columnIndex)
    
public  DategetDate(String columnName)
    
public  DategetDate(int index)
    
public  LinkDependencyGraphgetDependencyGraph()
    
protected  PersistentEntry[]getEntries()
    
public  PersistentEntrygetEntry(int index)
    
public  PersistentEntrygetEntry(String columnName)
    
public  StringgetFullColumnName(String columnKey)
    
public  StringgetFullColumnName(int columnIndex)
    
public  intgetIndex(String columnName)
    
public  Link[]getInlineLinks()
    
public  NumbergetNumber(String columnName)
    
public  NumbergetNumber(int index)
    
public  ObjectgetObject(String columnName)
    
public  ObjectgetObject(int index)
    
public  ListgetOptLockKey()
    
public  ObjectgetOriginalObject(String columnName)
    
public  ObjectgetOriginalObject(int index)
    
public  PersistentObjectgetPersistentObject()
    
public  ListgetPrimaryKey()
    
public  StategetState()
    
public  StringgetString(String columnName)
    
public  StringgetString(int index)
    
public  MetaTablegetTable()
    
public  StringgetTableAlias()
    
public  StringgetTableName()
     Gets table name.
public  booleanhasChildren()
    
public  booleanhasDirtyNonKeyFields()
    
public  booleanisAutoPadChars()
    
public  booleanisDeleted()
    
public  booleanisDirty()
    
public  booleanisEmpty()
    
public  booleanisFieldDirty(int index)
    
public  booleanisFieldDirty(String columnName)
    
public  booleanisForceModify()
    
public  booleanisInitialized()
    
public  booleanisNotOverwriteWithNulls()
    
public  booleanisNull(String columnName)
    
public  booleanisNull(int index)
    
public  booleanisPreserveOriginalValues()
    
public  booleanisSaved()
    
public  booleanisSkipInsertForKeysOnly()
    
public  LinkIteratorlinkIterator()
    
public  voidmarkAllFieldsDirty()
    
public  voidmarkFieldDirty(int index)
    
protected  voidmarshalChildren(ObjectOutput out)
    
protected  voidmarshalDescendant(ObjectOutput out)
    
 voidmoveRecordState()
    
public  RecordnewRecord()
    
public  voidreadExternal(ObjectInput in)
    
protected  ObjectreadObject(ObjectInput in, ColumnType type)
    
public  voidresetAfterModify()
    
public  voidsetAutoPadChars(boolean autoPadChars)
     Sets autoPadChars flag.
public  voidsetChildObject(String name, Object value)
    
public  voidsetDependencyGraph(LinkDependencyGraph dependencyGraph)
    
public  voidsetFieldDirty(int index, boolean dirty)
    
public  voidsetFieldDirty(String columnName, boolean dirty)
    
public  voidsetForceModify(boolean forceModify)
    
public  voidsetHasDirtyNonKeyFields(boolean hasDirtyNonKeyFields)
    
public  voidsetNotOverwriteWithNulls(boolean notOverwriteWithNulls)
    
public  voidsetObject(String columnName, Object value)
    
public  booleansetObject(int index, Object value)
    
 voidsetPersistentObject(PersistentObject persistentObject)
    
public  voidsetPreserveOriginalValues(boolean preserveOriginalValues)
    
public  voidsetSkipInsertForKeysOnly(boolean skipInsertForKeysOnly)
    
public  voidsetState(State state)
    
public  voidsetTableAlias(String tableAlias)
    
public  voidsetTableName(String tableName)
     Sets table name which will supercede the underlying MetaTable one when used to build SQL statements.
public static  voidsetupPrimitiveFields(Record recordFrom, Record recordTo)
    
public static  voidsetupUnmarshalledChildren(PersistentObject persistent, LinkedHashMap children)
    
public  intsize()
    
public  StringtableToString()
    
public  LinktoLink()
    
public  ParameterstoNotNullParameters(boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record.
public static  ParameterstoNotNullParameters(Record record, boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record .
public  ParameterstoParameters(int[] indeces)
     Returns Parameters object based on values and column types of the record for columns with indeces specified with "indeces" parameter.
public  ParameterstoParameters(boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record.
public static  ParameterstoParameters(Record record, boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record.
public static  ParameterstoParameters(Record record, boolean primaryKeyOnly, ToParametersPolicy policy)
     Returns Parameters object based on values and column types of the record.
public  int[]toPrimaryKeyIndeces()
    
public  StringtoString()
    
public  voidunmarkAllFieldsDirty()
    
public  voidunmarkFieldDirty(int index)
    
protected  voidunmarshalChildren(ObjectInput in)
    
protected  voidunmarshalDescendant(ObjectInput in)
    
public  Objectv2c(int index, Object value)
     Right pads character fields to column length with spaces.
public  Objectv2c(String columnName, Object value)
     Right pads character fields to column length with spaces.
public  voidwriteExternal(ObjectOutput out)
    
protected  voidwriteObject(ObjectOutput out, Object value)
    

Field Detail
DEFAULT_TO_PARAMETERS_POLICY
final public static DefaultToParametersPolicy DEFAULT_TO_PARAMETERS_POLICY(Code)



EMPTY_BYTE_ARRAY
final public static byte[] EMPTY_BYTE_ARRAY(Code)



NOT_NULL_TO_PARAMETERS_POLICY
final public static NotNullToParametersPolicy NOT_NULL_TO_PARAMETERS_POLICY(Code)



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
Record
public Record(MetaTable table)(Code)

Parameters:
  table -



Record
public Record(MetaTable table, boolean skipInsertForKeysOnly)(Code)

Parameters:
  table -
Parameters:
  skipInsertForKeysOnly - if true records with only primary columnName values modified will not be persisted



Record
public Record(MetaTable table, boolean skipInsertForKeysOnly, boolean autoPadChars)(Code)

Parameters:
  table -
Parameters:
  skipInsertForKeysOnly - if true records with only primary columnName values modified will not be persisted
Parameters:
  autoPadChars - if true char fields will be right padded with spaces to column length




Method Detail
addChild
public void addChild(Link link)(Code)
Add child link with specific name
Parameters:
  link -
throws:
  NullPointerException - if link has no name set
See Also:   Link



addPersistentEntry
public void addPersistentEntry(PersistentEntry entry)(Code)
Adds persistent entry using the parameter one as a template (entry is deep cloned)
Parameters:
  entry -



addPersistentEntry
public void addPersistentEntry(String newColumnName, PersistentEntry entry)(Code)
Adds persistent entry using the parameter one as a template
Parameters:
  newColumnName - if not null, sets a new column name for added entry
Parameters:
  entry -



addPersistentEntry
protected void addPersistentEntry(String newColumnName, PersistentEntry entry, boolean cloneEntry)(Code)
Adds persistent entry using the parameter one as a template
Parameters:
  newColumnName - if not null, sets a new column name for added entry
Parameters:
  entry -
Parameters:
  cloneEntry - if true added entry deep cloned before adding, otherwise it is added as is



assemble
void assemble(AbstractPersistentObject persistentObject)(Code)
Assembles LinkDependencyGraph
Parameters:
  persistentObject -



clearNonInlinedChildren
public void clearNonInlinedChildren()(Code)



clone
public Object clone() throws CloneNotSupportedException(Code)
deep copy of this record
throws:
  CloneNotSupportedException -



complexDirty
public boolean complexDirty()(Code)
Traverses through of child objects of parent persistent object of this record and returns true if at least one of them is dirty. If persistent object is not complex - returns false true if at least one of child objects of parent persistent object of this recordis dirty



copy
public void copy(Record source, Set updateableFields, boolean dirtyFieldsOnly)(Code)
Copies updateable fields from source record to this record. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied
Parameters:
  source - source record
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied



copy
void copy(Record source, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)(Code)
Copies updateable fields from source record to this record. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied If preserveStates is true then source record fields "dirty" states are passed unchanged from source record to this record even if the values are the same
Parameters:
  source - source record
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied
Parameters:
  preserveStates - if true then field "dirty" states are passed unchangedfrom source record to this record even if the values are the same



copyDirty
public void copyDirty(Record source, Set updateableFields)(Code)
Copies only dirty and updateable fields from source record to this record. If updateableFields Set is null then all dirty fields will be copied
Parameters:
  source - source record
Parameters:
  updateableFields - set of updateable column names



copyPreseveStates
void copyPreseveStates(Record source, Set updateableFields, boolean dirtyFieldsOnly)(Code)
Copies updateable fields from source record to this record. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied Source record fields "dirty" states are passed unchanged from source record to this record even if the values are the same
Parameters:
  source - source record
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copiedfrom source record to this record even if the values are the same



copyPreseveStates
void copyPreseveStates(Record source)(Code)
Copies all fields from source record to this record. Source record fields "dirty" states are passed unchanged from source record to this record even if the values are the same
Parameters:
  source - source recordfrom source record to this record even if the values are the same



different
protected boolean different(Object before, Object after)(Code)
Returns true is before and after values are different or the record is not yet initialized
Parameters:
  before -
Parameters:
  after - true is before and after values are different or the record is not yet initialized



different
public static boolean different(Record record, Object before, Object after)(Code)



equalsByValues
public boolean equalsByValues(Record thatRecord)(Code)



fieldsEqual
public boolean fieldsEqual(Record record)(Code)
Compares field values of this record to another one passed as parameter.
Parameters:
  record - true if field values of this record are equal to one passed as parameter.



getBoolean
public Boolean getBoolean(String columnName)(Code)
Returns field value as Boolean
Parameters:
  columnName - field value as Boolean



getBoolean
public Boolean getBoolean(int index)(Code)

Parameters:
  index - field value as Boolean



getChild
public Link getChild(String name)(Code)



getChildObject
public Object getChildObject(String name) throws SQLException(Code)
Gets child link result object
Parameters:
  name - child link result object
throws:
  SQLException - if child retrieval from database failed



getChildObjectStraight
protected Object getChildObjectStraight(String name)(Code)
Get child link result w/o causing lazy retrieval to fire
Parameters:
  name - Object



getColumn
public MetaColumn getColumn(String columnKey)(Code)

Parameters:
  columnKey - MetaColumn



getColumn
public MetaColumn getColumn(int columnIndex)(Code)

Parameters:
  columnIndex - MetaColumn



getColumnAlias
public String getColumnAlias(String columnKey)(Code)
Returns column alias
Parameters:
  columnKey - column alias



getColumnAlias
public String getColumnAlias(int columnIndex)(Code)
Returns column alias
Parameters:
  columnIndex - column alias



getColumnCount
public int getColumnCount()(Code)
Return number of record columns number of record columns



getColumnName
public String getColumnName(String columnKey)(Code)
Returns column name
Parameters:
  columnKey - column name



getColumnName
public String getColumnName(int columnIndex)(Code)
Returns column name
Parameters:
  columnIndex - column name



getDate
public Date getDate(String columnName)(Code)
Returns field value as Date
Parameters:
  columnName - field value as Date



getDate
public Date getDate(int index)(Code)
Returns field value as Date
Parameters:
  index - field value as Date



getDependencyGraph
public LinkDependencyGraph getDependencyGraph()(Code)
Gets LinkDependencyGraph LinkDependencyGraph



getEntries
protected PersistentEntry[] getEntries()(Code)
Returns array of persistent entries PersistentEntry[] - array of persistent entries
See Also:   PersistentEntry



getEntry
public PersistentEntry getEntry(int index)(Code)

Parameters:
  index - PersistentEntry



getEntry
public PersistentEntry getEntry(String columnName)(Code)

Parameters:
  columnName - PersistentEntry



getFullColumnName
public String getFullColumnName(String columnKey)(Code)
Returns fully qualified column name: [table name].[column name]
Parameters:
  columnKey - full column name



getFullColumnName
public String getFullColumnName(int columnIndex)(Code)
Returns fully qualified column name: [table name].[column name]
Parameters:
  columnIndex - full column name



getIndex
public int getIndex(String columnName)(Code)

Parameters:
  columnName - column index corresponding to column name



getInlineLinks
public Link[] getInlineLinks()(Code)
Experimental InlineLink[]



getNumber
public Number getNumber(String columnName)(Code)

Parameters:
  columnName - field value as Number



getNumber
public Number getNumber(int index)(Code)

Parameters:
  index - field value as Number



getObject
public Object getObject(String columnName)(Code)
Returns field value as Object
Parameters:
  columnName - field value as Object



getObject
public Object getObject(int index)(Code)
Returns field value as Object
Parameters:
  index - field value as Object



getOptLockKey
public List getOptLockKey()(Code)
Return List of optimistic lock column indeces List of optimistic lock column indeces



getOriginalObject
public Object getOriginalObject(String columnName)(Code)

Parameters:
  columnName - original value as Object



getOriginalObject
public Object getOriginalObject(int index)(Code)

Parameters:
  index - original value as Object



getPersistentObject
public PersistentObject getPersistentObject()(Code)
Gets parent PersistentObject parent PersistentObject



getPrimaryKey
public List getPrimaryKey()(Code)
Return List of primary key indeces List of primary key indeces



getState
public State getState()(Code)
Record state
See Also:   State



getString
public String getString(String columnName)(Code)
Returns field value as String
Parameters:
  columnName - field value as String



getString
public String getString(int index)(Code)
Returns field value as String
Parameters:
  index - field value as String



getTable
public MetaTable getTable()(Code)
Returns MetaTable associated with this Record MetaTable associated with this Record



getTableAlias
public String getTableAlias()(Code)



getTableName
public String getTableName()(Code)
Gets table name. If set it will supercede the underlying MetaTable one when used to build SQL statements. table name



hasChildren
public boolean hasChildren()(Code)
Returns true if this record has child links true if this record has child links



hasDirtyNonKeyFields
public boolean hasDirtyNonKeyFields()(Code)
true if Record has dirty non columnName fields



isAutoPadChars
public boolean isAutoPadChars()(Code)
if char fields will be right padded with spaces to column length



isDeleted
public boolean isDeleted()(Code)
Return true this record has been deleted true this record has been deleted



isDirty
public boolean isDirty()(Code)
Returns true if one of the fields has been modified true if one of the fields is modified



isEmpty
public boolean isEmpty()(Code)
Return true if this record contains no persistent entries true if this record contains no persistent entries



isFieldDirty
public boolean isFieldDirty(int index)(Code)

Parameters:
  index - if field is modified



isFieldDirty
public boolean isFieldDirty(String columnName)(Code)

Parameters:
  columnName - if field is modified



isForceModify
public boolean isForceModify()(Code)
Returns true if the record has to be modified even if none of the field is dirty true if the record has to be modified even if none of the field is dirty



isInitialized
public boolean isInitialized()(Code)
Returns true if this record came from or been saved to database true if this record came from or been saved to database



isNotOverwriteWithNulls
public boolean isNotOverwriteWithNulls()(Code)
Returns true if record values will not be overwritten by null values true if record values will not be overwritten by null values



isNull
public boolean isNull(String columnName)(Code)

Parameters:
  columnName - true is value is null



isNull
public boolean isNull(int index)(Code)

Parameters:
  index - true is value is null



isPreserveOriginalValues
public boolean isPreserveOriginalValues()(Code)
if original values will be serialized when parent persistent objectgets serialized though Externalizeable interface methods



isSaved
public boolean isSaved()(Code)
Returns true if this record has been saved to database true if this record has been saved to database



isSkipInsertForKeysOnly
public boolean isSkipInsertForKeysOnly()(Code)
true if the Record will not be persisted in case of columnName only fields are populated



linkIterator
public LinkIterator linkIterator()(Code)
Returns record LinkIterator LinkIterator



markAllFieldsDirty
public void markAllFieldsDirty()(Code)
Marks all fields as dirty



markFieldDirty
public void markFieldDirty(int index)(Code)
Marks field as dirty
Parameters:
  index -



marshalChildren
protected void marshalChildren(ObjectOutput out) throws IOException(Code)
Serializes child links
Parameters:
  out -
throws:
  IOException -



marshalDescendant
protected void marshalDescendant(ObjectOutput out) throws IOException(Code)
Method to be implemented in descendants to add to objects being serialized thorugh writeExternal(ObjectOutput out) method
Parameters:
  out -
throws:
  IOException -



moveRecordState
void moveRecordState()(Code)
Moves record state to the next appropriate position
See Also:   State



newRecord
public Record newRecord()(Code)
Create new Record object with attributes base on this record new Record object with attributes base on this record



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Implementation of Externalizable interface
Parameters:
  in -
throws:
  IOException -
throws:
  ClassNotFoundException -
See Also:   java.io.Externalizable



readObject
protected Object readObject(ObjectInput in, ColumnType type) throws IOException, ClassNotFoundException(Code)



resetAfterModify
public void resetAfterModify()(Code)
Resets record state and dirty flags



setAutoPadChars
public void setAutoPadChars(boolean autoPadChars)(Code)
Sets autoPadChars flag. If set to true, character fields will be right padded with spaces to column length
Parameters:
  autoPadChars - if true char fields will be right padded with spaces to column length



setChildObject
public void setChildObject(String name, Object value)(Code)
Sets result value to link with specific name name
Parameters:
  name - name of child link
Parameters:
  value -
See Also:   Link.setResult(Object)
See Also:   Link.getName



setDependencyGraph
public void setDependencyGraph(LinkDependencyGraph dependencyGraph)(Code)
Sets LinkDependencyGraph
Parameters:
  dependencyGraph -
See Also:   LinkDependencyGraph



setFieldDirty
public void setFieldDirty(int index, boolean dirty)(Code)

Parameters:
  index -
Parameters:
  dirty -



setFieldDirty
public void setFieldDirty(String columnName, boolean dirty)(Code)

Parameters:
  columnName -
Parameters:
  dirty -



setForceModify
public void setForceModify(boolean forceModify)(Code)
Indicates if the record has to be modified even if none of the field is dirty
Parameters:
  forceModify - indicates if the record has to be modified even if none of the field is dirty



setHasDirtyNonKeyFields
public void setHasDirtyNonKeyFields(boolean hasDirtyNonKeyFields)(Code)

Parameters:
  hasDirtyNonKeyFields -



setNotOverwriteWithNulls
public void setNotOverwriteWithNulls(boolean notOverwriteWithNulls)(Code)

Parameters:
  notOverwriteWithNulls - true if record values will not be overwritten by null values



setObject
public void setObject(String columnName, Object value)(Code)
Sets field value by column name
Parameters:
  columnName -
Parameters:
  value -



setObject
public boolean setObject(int index, Object value)(Code)
Sets field value by index
Parameters:
  index -
Parameters:
  value -



setPersistentObject
void setPersistentObject(PersistentObject persistentObject)(Code)
Sets parent PersistentObject
Parameters:
  persistentObject -



setPreserveOriginalValues
public void setPreserveOriginalValues(boolean preserveOriginalValues)(Code)

Parameters:
  preserveOriginalValues - if true original values will be serialized when parent persistent objectgets serialized though Externalizeable interface methods



setSkipInsertForKeysOnly
public void setSkipInsertForKeysOnly(boolean skipInsertForKeysOnly)(Code)

Parameters:
  skipInsertForKeysOnly -



setState
public void setState(State state)(Code)

Parameters:
  state -
See Also:   State



setTableAlias
public void setTableAlias(String tableAlias)(Code)



setTableName
public void setTableName(String tableName)(Code)
Sets table name which will supercede the underlying MetaTable one when used to build SQL statements.
Parameters:
  tableName -



setupPrimitiveFields
public static void setupPrimitiveFields(Record recordFrom, Record recordTo)(Code)



setupUnmarshalledChildren
public static void setupUnmarshalledChildren(PersistentObject persistent, LinkedHashMap children)(Code)



size
public int size()(Code)
number of persistent entries



tableToString
public String tableToString()(Code)
Returns string representation of underlying MetaTable string representation of underlying MetaTable



toLink
public Link toLink()(Code)
Returns Link reperesentation of this Record Link reperesentation of this Record



toNotNullParameters
public Parameters toNotNullParameters(boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty" and not nulls
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toNotNullParameters
public static Parameters toNotNullParameters(Record record, boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record . This method will populate parameters only if corresponding fields are "dirty" and not nulls
Parameters:
  record - Record
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toParameters
public Parameters toParameters(int[] indeces)(Code)
Returns Parameters object based on values and column types of the record for columns with indeces specified with "indeces" parameter. This method will populate parameters regardless of whether they are "dirty" flags or nulls
Parameters:
  indeces - Parameters object based on values and column types of the record for columns with indecesspecified with "indeces" parameter



toParameters
public Parameters toParameters(boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty"
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toParameters
public static Parameters toParameters(Record record, boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record. This method will populate all parameters only if corresponding fields are "dirty"
Parameters:
  record - Record
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toParameters
public static Parameters toParameters(Record record, boolean primaryKeyOnly, ToParametersPolicy policy)(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters with accord to ToParametersPolicy
Parameters:
  record - Record
Parameters:
  primaryKeyOnly - if true only primary key columns are considered
Parameters:
  policy - ToParametersPolicy object Parameters object based on values and column types of the record and ctl parameter
See Also:   ToParametersPolicy



toPrimaryKeyIndeces
public int[] toPrimaryKeyIndeces()(Code)



toString
public String toString()(Code)



unmarkAllFieldsDirty
public void unmarkAllFieldsDirty()(Code)
Resets dirty flags



unmarkFieldDirty
public void unmarkFieldDirty(int index)(Code)
Resets dirty flags
Parameters:
  index -



unmarshalChildren
protected void unmarshalChildren(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Deserializes child links
Parameters:
  in -
throws:
  IOException -
throws:
  ClassNotFoundException -



unmarshalDescendant
protected void unmarshalDescendant(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Method to be implemented in descendants to add to objects being serialized thorugh readExternal(ObjectOutput out) method
Parameters:
  in -
throws:
  IOException -
throws:
  ClassNotFoundException -



v2c
public Object v2c(int index, Object value)(Code)
Right pads character fields to column length with spaces.
Parameters:
  index -
Parameters:
  value - Object



v2c
public Object v2c(String columnName, Object value)(Code)
Right pads character fields to column length with spaces.
Parameters:
  columnName -
Parameters:
  value - Object



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Implementation of Externalizable interface
Parameters:
  out -
throws:
  IOException -
See Also:   java.io.Externalizable



writeObject
protected void writeObject(ObjectOutput out, Object value) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.