org.melati.example.contacts
Class Contact

Package class diagram package Contact
java.lang.Object
  extended by org.melati.poem.transaction.Transactioned
      extended by org.melati.poem.JdbcPersistent
          extended by org.melati.example.contacts.generated.ContactBase
              extended by org.melati.example.contacts.Contact
All Implemented Interfaces:
Cloneable, Persistable, Persistent, Treeable

public class Contact
extends ContactBase
implements Treeable

A Contact object, embellished from the original, Melati POEM generated, programmer modifiable stub.

Description: A Contact.

Field summary for SQL table Contact
NameTypeDescription
id Integer  
name String Contact Name
owner Contact Contact who owns this contact
address String Contact Address
updates Integer How many times has this record been updated?
lastupdated Date When was this last updated?
lastupdateuser User Who last updated this?

Generator
org.melati.poem.prepro.TableDef#generateMainJava

Nested Class Summary
 class Contact.DescendantParentException
          Thrown when an attempt to make a descendant an ancestor is made.
 
Field Summary
 
Fields inherited from class org.melati.example.contacts.generated.ContactBase
address, id, lastupdated, lastupdateuser, name, owner, updates
 
Fields inherited from class org.melati.poem.transaction.Transactioned
valid
 
Constructor Summary
Contact()
          Constructor for a Persistent Contact object.
 
Method Summary
static Treeable[] arrayOf(Enumeration e)
           
static Treeable[] arrayOf(Vector v)
           
 ArrayList getAncestors()
           
 Treeable[] getChildren()
           
 boolean isIn(Category category)
           
 void setOwner(Contact cooked)
          Set the Owner.
protected  void writeLock()
          Check if we may write to this object and then lock it.
 
Methods inherited from class org.melati.example.contacts.generated.ContactBase
getAddress_unsafe, getAddress, getAddressField, getContactsDatabaseTables, getContactTable, getId_unsafe, getId, getIdField, getLastupdated_unsafe, getLastupdated, getLastupdatedField, getLastupdateuser_unsafe, getLastupdateuser, getLastupdateuserField, getLastupdateuserTroid, getName_unsafe, getName, getNameField, getOwner_unsafe, getOwner, getOwnerField, getOwnerTroid, getUpdates_unsafe, getUpdates, getUpdatesField, setAddress_unsafe, setAddress, setId_unsafe, setId, setId, setLastupdated_unsafe, setLastupdated, setLastupdateuser_unsafe, setLastupdateuser, setLastupdateuserTroid, setName_unsafe, setName, setOwner_unsafe, setOwnerTroid, setUpdates_unsafe, setUpdates, setUpdates
 
Methods inherited from class org.melati.poem.JdbcPersistent
assertCanCreate, assertCanCreate, assertCanDelete, assertCanDelete, assertCanRead, assertCanRead, assertCanWrite, assertCanWrite, clone, commit, countMatchSQL, delete_unsafe, delete, delete, deleteAndCommit, deleteAndCommit, deleteLock, displayString, displayString, displayString, dump, dump, duplicated, duplicatedFloating, equals, existenceLock, existenceLock, fieldsOfColumns, fromClause, getCanDelete, getCanRead, getCanSelect, getCanWrite, getCooked, getCookedString, getDatabase, getDetailDisplayFields, getField, getFields, getPrimaryDisplayField, getRaw, getRawString, getReadable, getRecordDisplayFields, getSearchCriterionFields, getSummaryDisplayFields, getTable, getTroid, hashCode, invalidate, isDirty, load, makePersistent, postEdit, postInsert, postModify, postWrite, preEdit, readLock, readLock, readLock, rollback, setCooked, setDirty, setRaw, setRawString, statusExistent, statusNonexistent, toString, troid, upToDate, writeDown, writeLock, writeLock
 
Methods inherited from class org.melati.poem.transaction.Transactioned
markValid, reset, setTransactionPool, transactionPool, unSee
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.melati.poem.Treeable
getName
 

Constructor Detail

Contact

public Contact()
Constructor for a Persistent Contact object.

Description: A Contact.

Generator
org.melati.poem.prepro.TableDef#generateMainJava
Method Detail

isIn

public boolean isIn(Category category)
Returns:
whether contact is in the category

writeLock

protected void writeLock()
Description copied from class: JdbcPersistent
Check if we may write to this object and then lock it.

Overrides:
writeLock in class JdbcPersistent

getChildren

public Treeable[] getChildren()
Specified by:
getChildren in interface Treeable
Overrides:
getChildren in class JdbcPersistent
Returns:
an Array of Treeable children

getAncestors

public ArrayList getAncestors()
Returns:
the ancestors

setOwner

public void setOwner(Contact cooked)
              throws AccessPoemException
Description copied from class: ContactBase
Set the Owner.

Overrides:
setOwner in class ContactBase
Parameters:
cooked - a validated Contact
Throws:
AccessPoemException - if the current AccessToken does not confer write access rights

arrayOf

public static Treeable[] arrayOf(Vector v)
Parameters:
v - vector od Treeables
Returns:
an array of Treeables

arrayOf

public static Treeable[] arrayOf(Enumeration e)
Parameters:
e - enumeration of Treeables
Returns:
an array of Treeables


Copyright © 2000-2010 PanEris. All Rights Reserved.