org.melati.poem
Class ColumnInfo

Package class diagram package ColumnInfo
java.lang.Object
  extended by org.melati.poem.transaction.Transactioned
      extended by org.melati.poem.JdbcPersistent
          extended by org.melati.poem.generated.ValueInfoBase
              extended by org.melati.poem.ValueInfo
                  extended by org.melati.poem.generated.ColumnInfoBase
                      extended by org.melati.poem.ColumnInfo
All Implemented Interfaces:
Cloneable, Persistable, Persistent, Treeable

public class ColumnInfo
extends ColumnInfoBase

All the data defining a Column; actually a Persistent from the ColumnInfoTable. Melati POEM generated, programmer modifiable stub for a Persistent ColumnInfo object.

Description: Configuration information about a column in the database.

Field summary for SQL table ColumnInfo
NameTypeDescription
id Integer  
tableinfo TableInfo The table to which the field belongs
name String A code-name for the field
displayorder Integer A rank determining where the field appears in lists
usercreateable Boolean Whether it makes sense for the user to initialise the field's value
displaylevel DisplayLevel A category determining what granularity of report the field appears in
searchability Searchability A category determining what level of searching this field supports
displayorderpriority Integer If present, the level at which lists of records are sorted by the field
sortdescending Boolean Whether when sorting by this column, the sort order should be reversed
indexed Boolean Whether the field is indexed (ignored if the field is marked `unique')
unique Boolean Whether the field is unique (implies that it's `indexed')
integrityfix StandardIntegrityFix How referential integrity is maintained, what to do when the object referred to is deleted

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

Field Summary
 
Fields inherited from class org.melati.poem.generated.ColumnInfoBase
displaylevel, displayorder, displayorderpriority, id, indexed, integrityfix, name, searchability, sortdescending, tableinfo, unique, usercreateable
 
Fields inherited from class org.melati.poem.generated.ValueInfoBase
description, displayname, height, nullable, precision, rangelimit_string, rangelow_string, renderinfo, scale, size, typefactory, usereditable, width
 
Fields inherited from class org.melati.poem.transaction.Transactioned
valid
 
Constructor Summary
ColumnInfo()
           
 
Method Summary
 void assertCanRead(AccessToken token)
          Allow reading by not throwing an exception.
 Enumeration getDsdQualifiers()
          Only those fields which are relevant to this column and legal as a field qualifier in the DSD.
 void setDisplaylevelIndex(Integer index)
          Set the DisplaylevelIndex value.
 void setName(String name)
          Set the name if it is not set.
 void setTableinfoTroid(Integer raw)
          Set the TableInfo reference.
 
Methods inherited from class org.melati.poem.generated.ColumnInfoBase
getColumnInfoTable, getDisplaylevel_unsafe, getDisplaylevel, getDisplaylevelField, getDisplaylevelIndex, getDisplayorder_unsafe, getDisplayorder, getDisplayorderField, getDisplayorderpriority_unsafe, getDisplayorderpriority, getDisplayorderpriorityField, getId_unsafe, getId, getIdField, getIndexed_unsafe, getIndexed, getIndexedField, getIntegrityfix_unsafe, getIntegrityfix, getIntegrityfixField, getIntegrityfixIndex, getName_unsafe, getName, getNameField, getPoemDatabaseTables, getSearchability_unsafe, getSearchability, getSearchabilityField, getSearchabilityIndex, getSortdescending_unsafe, getSortdescending, getSortdescendingField, getTableinfo_unsafe, getTableinfo, getTableinfoField, getTableinfoTroid, getUnique_unsafe, getUnique, getUniqueField, getUsercreateable_unsafe, getUsercreateable, getUsercreateableField, setDisplaylevel_unsafe, setDisplaylevel, setDisplayorder_unsafe, setDisplayorder, setDisplayorder, setDisplayorderpriority_unsafe, setDisplayorderpriority, setDisplayorderpriority, setId_unsafe, setId, setId, setIndexed_unsafe, setIndexed, setIndexed, setIntegrityfix_unsafe, setIntegrityfix, setIntegrityfixIndex, setName_unsafe, setSearchability_unsafe, setSearchability, setSearchabilityIndex, setSortdescending_unsafe, setSortdescending, setSortdescending, setTableinfo_unsafe, setTableinfo, setUnique_unsafe, setUnique, setUnique, setUsercreateable_unsafe, setUsercreateable, setUsercreateable
 
Methods inherited from class org.melati.poem.ValueInfo
fieldAttributesRenamedAs, getRangelimit_stringField, getRangelow_stringField, getType, setRangelimit_string, setRangelow_string, toTypeParameter
 
Methods inherited from class org.melati.poem.generated.ValueInfoBase
getDescription_unsafe, getDescription, getDescriptionField, getDisplayname_unsafe, getDisplayname, getDisplaynameField, getHeight_unsafe, getHeight, getHeightField, getNullable_unsafe, getNullable, getNullableField, getPrecision_unsafe, getPrecision, getPrecisionField, getRangelimit_string_unsafe, getRangelimit_string, getRangelow_string_unsafe, getRangelow_string, getRenderinfo_unsafe, getRenderinfo, getRenderinfoField, getScale_unsafe, getScale, getScaleField, getSize_unsafe, getSize, getSizeField, getTypefactory_unsafe, getTypefactory, getTypefactoryCode, getTypefactoryField, getUsereditable_unsafe, getUsereditable, getUsereditableField, getValueInfoTable, getWidth_unsafe, getWidth, getWidthField, setDescription_unsafe, setDescription, setDisplayname_unsafe, setDisplayname, setHeight_unsafe, setHeight, setHeight, setNullable_unsafe, setNullable, setNullable, setPrecision_unsafe, setPrecision, setPrecision, setRangelimit_string_unsafe, setRangelow_string_unsafe, setRenderinfo_unsafe, setRenderinfo, setScale_unsafe, setScale, setScale, setSize_unsafe, setSize, setSize, setTypefactory_unsafe, setTypefactory, setTypefactoryCode, setUsereditable_unsafe, setUsereditable, setUsereditable, setWidth_unsafe, setWidth, setWidth
 
Methods inherited from class org.melati.poem.JdbcPersistent
assertCanCreate, assertCanCreate, assertCanDelete, assertCanDelete, 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, getChildren, 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, 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
 

Constructor Detail

ColumnInfo

public ColumnInfo()
Method Detail

assertCanRead

public void assertCanRead(AccessToken token)
Allow reading by not throwing an exception. Check that you have read access to the object. Which is to say: the AccessToken associated with the POEM task executing in the running thread confers the Capability required for inspecting the object's fields. The access token is set when the task is invoked using Database.inSession. The capability is determined by getCanRead, which by default means the capability defined in the record's canread field in the database. If that's null, the table's default canread capability is obtained using getTable().getDefaultCanRead(). If that is null as well, access is granted unconditionally.

Although this check can in theory be quite time-consuming, in practice this isn't a problem, because the most recent access token for which the check succeeded is cached; repeat accesses from within the same transaction are therefore quick.

Application programmers can override this method to implement their own programmatic access policies. For instance, POEM's own TableInfo class overrides it with an empty method in order to disable all read protection on TableInfo objects. More interestingly, you could implement a check that depends on the values of the object's fields: for example, you could allow read access to an invoice record to its issuing and receiving parties.

Specified by:
assertCanRead in interface Persistent
Overrides:
assertCanRead in class JdbcPersistent
Parameters:
token - the access token on the basis of which readability is being claimed
See Also:
Persistent.assertCanRead(org.melati.poem.AccessToken)

setName

public void setName(String name)
Set the name if it is not set.

Overrides:
setName in class ColumnInfoBase
Parameters:
name - the name to set

setTableinfoTroid

public void setTableinfoTroid(Integer raw)
                       throws AccessPoemException
Set the TableInfo reference.

Overrides:
setTableinfoTroid in class ColumnInfoBase
Parameters:
raw - the troid value to set
Throws:
AccessPoemException - if the current AccessToken does not confer write access rights

setDisplaylevelIndex

public void setDisplaylevelIndex(Integer index)
Set the DisplaylevelIndex value.

Overrides:
setDisplaylevelIndex in class ColumnInfoBase
Parameters:
index - the DisplaylevelIndex value to set

getDsdQualifiers

public Enumeration getDsdQualifiers()
Only those fields which are relevant to this column and legal as a field qualifier in the DSD. Used in org.melati.admin.DSD.wm.

Returns:
an Enumeration of Fields


Copyright © 2000-2010 PanEris. All Rights Reserved.