de.mguennewig.pobjects
Class PclassColumn

java.lang.Object
  extended by de.mguennewig.pobjects.Record
      extended by de.mguennewig.pobjects.PObject
          extended by de.mguennewig.pobjects.PclassColumn

public final class PclassColumn
extends PObject

PObject interface class for class PclassColumn.

Author:
Michael Günnewig

Field Summary
static Field attrColumnName
          Contains the definition for columnName.
static IdField attrId
          Contains the definition for id.
static Field attrPclass
          Contains the definition for pclass.
static StringType atypeColumnName
          Contains the type definition for columnName.
static Int32Type atypeId
          Contains the type definition for id.
static RefType atypePclass
          Contains the type definition for pclass.
static ClassDecl cdeclPclassColumn
          Contains the metadata used to create this class.
static UniqueConstraint uniquePclassColumnPclassColumnName
           
 
Fields inherited from class de.mguennewig.pobjects.PObject
CHECK_ALL_FIELDS, CHECK_CHANGED_ONLY, CHECK_NOTHING, STATE_COMMITED, STATE_DELETE, STATE_DIRTY, STATE_INTERNALIZED, STATE_INVALID, STATE_NEW_OBJECT, STATE_REFERENCE, STATE_TRANSIENT
 
Constructor Summary
PclassColumn()
          Creates a new PclassColumn with default values.
PclassColumn(java.lang.String columnName, Pclass pclass)
          Creates a new PclassColumn with all values specified.
 
Method Summary
 java.lang.Object get(int i)
          Returns the value of the column with index i.
 ClassDecl getClassDecl()
          Returns the metadata used to create this class.
 Field getColumnForThis()
          Returns the column declaration of the table described by this instance.
 java.lang.String getColumnName()
          Returns the value of columnName.
 java.lang.String getColumnNameForVisual()
          Returns the preferred string representation of columnName.
 java.lang.String getIdForVisual()
          
 Pclass getPclass()
          Returns the value of pclass.
static PclassColumn[] getPclassColumns(Pclass pclass)
          Returns all PclassColumns for the given Pclass.
 java.lang.String getPclassForVisual()
          Returns the preferred string representation of pclass.
 void set(int i, java.lang.Object value)
          Set value of field with index index.
 void setColumnName(java.lang.String v)
          Sets the value for columnName.
 void setPclass(Pclass v)
          Sets the value for pclass.
 
Methods inherited from class de.mguennewig.pobjects.PObject
checkConstraints, checkConstraints, copyState, delete, getChangedValues, getContainer, getDefaultFieldCheckStyle, getId, getKey, getKey, getOldValues, getPObjState, getTableExpr, isInstanceOf, isInternalized, isPersistent, isReference, loadForUpdate, loadIfReference, revert, set, setDefaultFieldCheckStyle, store, store, toString
 
Methods inherited from class de.mguennewig.pobjects.Record
format, get
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

atypeId

public static final Int32Type atypeId
Contains the type definition for id.


attrId

public static final IdField attrId
Contains the definition for id.

See Also:
atypeId

atypePclass

public static final RefType atypePclass
Contains the type definition for pclass.


attrPclass

public static final Field attrPclass
Contains the definition for pclass.

See Also:
atypePclass

atypeColumnName

public static final StringType atypeColumnName
Contains the type definition for columnName.


attrColumnName

public static final Field attrColumnName
Contains the definition for columnName.

See Also:
atypeColumnName

uniquePclassColumnPclassColumnName

public static final UniqueConstraint uniquePclassColumnPclassColumnName

cdeclPclassColumn

public static final ClassDecl cdeclPclassColumn
Contains the metadata used to create this class.

Constructor Detail

PclassColumn

public PclassColumn()
Creates a new PclassColumn with default values.


PclassColumn

public PclassColumn(java.lang.String columnName,
                    Pclass pclass)
Creates a new PclassColumn with all values specified.

Parameters:
columnName - The column name.
pclass - The pclass instance that describes the table to which the column belongs.
Method Detail

getClassDecl

public ClassDecl getClassDecl()
Returns the metadata used to create this class.

Specified by:
getClassDecl in class PObject

getPclass

public Pclass getPclass()
Returns the value of pclass.

This method ensures that all data will be read from the DBMS if not already done.

Throws:
PObjReadError - if a database error occurs.

getPclassForVisual

public java.lang.String getPclassForVisual()
Returns the preferred string representation of pclass.

Throws:
PObjReadError - if a database error occurs.
See Also:
getPclass()

setPclass

public void setPclass(Pclass v)
Sets the value for pclass.

This method ensures that all data will be read from the DBMS if not already done, before changing the field.

Throws:
PObjReadError - if a database error occurs.

getColumnName

public java.lang.String getColumnName()
Returns the value of columnName.

This method ensures that all data will be read from the DBMS if not already done.

Throws:
PObjReadError - if a database error occurs.

getColumnNameForVisual

public java.lang.String getColumnNameForVisual()
Returns the preferred string representation of columnName.

Throws:
PObjReadError - if a database error occurs.
See Also:
getColumnName()

setColumnName

public void setColumnName(java.lang.String v)
Sets the value for columnName.

This method ensures that all data will be read from the DBMS if not already done, before changing the field.

Throws:
PObjReadError - if a database error occurs.

get

public java.lang.Object get(int i)
Returns the value of the column with index i.

Specified by:
get in class Record
Throws:
java.lang.IndexOutOfBoundsException - if no column with index i exists.

set

public void set(int i,
                java.lang.Object value)
Description copied from class: Record
Set value of field with index index.

This method is primarily intended for use by procedures that work on meta level of de.mguennewig.pobjects. It differs from the per field setXXX() methods in that it does not load the object's data if it is not in memory. If unsure whether the object's state has been internalized, then any call to this method must be preceded by a call to PObject.loadIfReference().

Specified by:
set in class Record

getIdForVisual

public java.lang.String getIdForVisual()

Overrides:
getIdForVisual in class PObject

getColumnForThis

public Field getColumnForThis()
Returns the column declaration of the table described by this instance.

Returns:
the metadata for the column or null if it is not known to the container.
See Also:
Pclass.getTableForThis()

getPclassColumns

public static PclassColumn[] getPclassColumns(Pclass pclass)
Returns all PclassColumns for the given Pclass.

Throws:
PObjReadError - if any database error occurs.