org.gusdb.wdk.model
Class RecordInstance

java.lang.Object
  extended by org.gusdb.wdk.model.RecordInstance

public class RecordInstance
extends java.lang.Object


Field Summary
static int MAXIMUM_NESTED_RECORD_INSTANCES
           
 
Constructor Summary
RecordInstance(RecordClass recordClass)
           
 
Method Summary
static void checkInstantiatedText(java.lang.String instantiatedText)
           
static boolean containsMacro(java.lang.String text, java.lang.String macroName)
           
 java.util.Map getAttributes()
           
 java.lang.Object getAttributeValue(java.lang.String attributeName)
          Get the value for a attribute or a text attribute
 java.util.Map getNestedRecordInstanceLists()
           
 java.util.Map getNestedRecordInstances()
           
 PrimaryKeyValue getPrimaryKey()
          Modified by Jerric - use an object for primaryKeyValue
 RecordClass getRecordClass()
           
 java.util.Map getTables()
           
 ResultList getTableValue(java.lang.String tableName)
           
static java.lang.String instantiateText(java.lang.String text, java.lang.String macroName, java.lang.String value)
          substitute a value for a macro in a text string.
 boolean isSummaryAttribute(java.lang.String attName)
           
 java.lang.String print()
           
 java.lang.String printSummary()
           
 void setPrimaryKey(java.lang.String projectId, java.lang.String recordId)
          Modified by Jerric - Use two parts as primarykeyValue, projectId and the original recordId String
 java.lang.String toXML()
           
 java.lang.String toXML(java.lang.String ident)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_NESTED_RECORD_INSTANCES

public static final int MAXIMUM_NESTED_RECORD_INSTANCES
See Also:
Constant Field Values
Constructor Detail

RecordInstance

public RecordInstance(RecordClass recordClass)
Method Detail

getRecordClass

public RecordClass getRecordClass()

setPrimaryKey

public void setPrimaryKey(java.lang.String projectId,
                          java.lang.String recordId)
                   throws WdkModelException
Modified by Jerric - Use two parts as primarykeyValue, projectId and the original recordId String

Parameters:
projectId -
recordId -
Throws:
WdkModelException

getPrimaryKey

public PrimaryKeyValue getPrimaryKey()
Modified by Jerric - use an object for primaryKeyValue

Returns:

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String attributeName)
                                   throws WdkModelException
Get the value for a attribute or a text attribute

Throws:
WdkModelException

getTableValue

public ResultList getTableValue(java.lang.String tableName)
                         throws WdkModelException
Throws:
WdkModelException

getTables

public java.util.Map getTables()
Returns:
Map of tableName -> TableFieldValue

getAttributes

public java.util.Map getAttributes()
Returns:
Map of tableName -> AttributeFieldValue

getNestedRecordInstances

public java.util.Map getNestedRecordInstances()
                                       throws WdkModelException,
                                              WdkUserException
Throws:
WdkModelException
WdkUserException

getNestedRecordInstanceLists

public java.util.Map getNestedRecordInstanceLists()
                                           throws WdkModelException,
                                                  WdkUserException
Throws:
WdkModelException
WdkUserException

print

public java.lang.String print()
                       throws WdkModelException,
                              WdkUserException
Throws:
WdkModelException
WdkUserException

printSummary

public java.lang.String printSummary()
                              throws WdkModelException
Throws:
WdkModelException

toXML

public java.lang.String toXML()
                       throws WdkModelException,
                              WdkUserException
Throws:
WdkModelException
WdkUserException

toXML

public java.lang.String toXML(java.lang.String ident)
                       throws WdkModelException,
                              WdkUserException
Throws:
WdkModelException
WdkUserException

isSummaryAttribute

public boolean isSummaryAttribute(java.lang.String attName)

instantiateText

public static java.lang.String instantiateText(java.lang.String text,
                                               java.lang.String macroName,
                                               java.lang.String value)
substitute a value for a macro in a text string. The macro is delimited by $$

Parameters:
text - the text which contains the macro
macroName - the name of the macro, without the delimiter
value - the value to substitute in

containsMacro

public static boolean containsMacro(java.lang.String text,
                                    java.lang.String macroName)

checkInstantiatedText

public static void checkInstantiatedText(java.lang.String instantiatedText)
                                  throws WdkModelException
Throws:
WdkModelException