org.melati.poem
Class CapabilityTable

Package class diagram package CapabilityTable
java.lang.Object
  extended by org.melati.poem.JdbcTable
      extended by org.melati.poem.PoemTable
          extended by org.melati.poem.generated.CapabilityTableBase
              extended by org.melati.poem.CapabilityTable
All Implemented Interfaces:
Selectable, Table

public class CapabilityTable
extends CapabilityTableBase

The Table of Capabilitys. Every Melati DB has this table. This table will contain at least _administer_. Melati POEM generated, programmer modifiable stub for a CapabilityTable object.

Description: A capability which users can be required to possess before accessing data.

Field summary for SQL table Capability
NameTypeDescription
id Integer The Table Row Object ID
name String A human-readable name for the capability

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

Constructor Summary
CapabilityTable(Database database, String name, DefinitionSource definitionSource)
          Constructor.
 
Method Summary
 Capability ensure(String name)
          Make sure that a record exists.
 Capability get(String name)
          Retrieve a Capability by name.
 void unifyWithDB(ResultSet colDescs)
          Ensure that the _administer_ Capability exists and apply it to this table, also create canRead, canWrite, candelete and canSelect as they are referrred to in column definition.
 
Methods inherited from class org.melati.poem.generated.CapabilityTableBase
_newPersistent, defaultCategory, defaultDescription, defaultDisplayOrder, defaultRememberAllTroids, getCapabilityObject, getCapabilityObject, getIdColumn, getNameColumn, getPoemDatabaseTables, init
 
Methods inherited from class org.melati.poem.PoemTable
postInitialise
 
Methods inherited from class org.melati.poem.JdbcTable
_getColumn, addColumnAndCommit, addListener, appendWhereClause, cachedCount, cachedCount, cachedCount, cachedCount, cachedCount, cachedExists, cachedSelection, cachedSelectionField, cachedSelectionType, canDeleteColumn, canReadColumn, canSelectColumn, canWriteColumn, clearColumnInfoCaches, cnfWhereClause, cnfWhereClause, columns, columnWithColumnInfoID, count, count, count, count, countSQL, countSQL, create, create, createTableInfo, dbAddConstraints, dbModifyStructure, defaultCacheLimit, defaultDisplayName, defaultOrderByClause, defineColumn, delete_unsafe, delete, deleteColumnAndCommit, deletedColumn, displayColumn, displayColumns, displayColumnsCount, dump, dump, dumpCacheAnalysis, equals, exists, exists, extrasCount, firstSelection, getCacheInfo, getCanCreate, getCategory, getColumn, getColumnsCount, getDatabase, getDbmsTableType, getDefaultCanDelete, getDefaultCanRead, getDefaultCanWrite, getDescription, getDetailDisplayColumns, getDetailDisplayColumnsCount, getDisplayName, getDsdName, getInfo, getMostRecentTroid, getName, getNextExtrasIndex, getObject, getObject, getRecordDisplayColumns, getRecordDisplayColumnsCount, getSearchCriterionColumns, getSearchCriterionColumnsCount, getSummaryDisplayColumns, getSummaryDisplayColumnsCount, getTableInfo, hashCode, invalidateTransactionStuffs, load, newPersistent, notifyColumnInfo, notifyTouched, primaryCriterionColumn, quotedName, readLock, referencesTo, referencesTo, rememberAllTroids, selection, selection, selection, selection, selection, selection, selectionSQL, serial, setCacheLimit, setDisplayColumn, setSearchColumn, setTableInfo, tableInfoID, toString, trimCache, troidColumn, troidFor, troidSelection, troidSelection, troidSelection, uncache, unifyWithColumnInfo, whereClause, whereClause, writeDown
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CapabilityTable

public CapabilityTable(Database database,
                       String name,
                       DefinitionSource definitionSource)
                throws PoemException
Constructor.

Parameters:
database - the POEM database we are using
name - the name of this Table
definitionSource - which definition is being used
Throws:
PoemException - if anything goes wrong
Generator
org.melati.poem.prepro.TableDef#generateTableMainJava
Method Detail

unifyWithDB

public void unifyWithDB(ResultSet colDescs)
                 throws PoemException
Ensure that the _administer_ Capability exists and apply it to this table, also create canRead, canWrite, candelete and canSelect as they are referrred to in column definition.

Specified by:
unifyWithDB in interface Table
Overrides:
unifyWithDB in class JdbcTable
Parameters:
colDescs - the Column descriptions
Throws:
PoemException
See Also:
org.melati.poem.Table#defineColumn(Column, boolean)

get

public Capability get(String name)
Retrieve a Capability by name.

Parameters:
name - the name of the Capability to return
Returns:
the existing Capability

ensure

public Capability ensure(String name)
Make sure that a record exists.

Parameters:
name - the name of the Capability to ensure
Returns:
the existing or newly created Capability


Copyright © 2000-2010 PanEris. All Rights Reserved.