com.irisel.oms.olapi.internal
Interface Model


public interface Model

This interface declares the methods needed to implement an OMS Object Model. A Model offers methods to get the Class objects conforming the OMS Object Model. and methods to add new Class objects to the model.


Field Summary
static java.lang.String DM_CLASS_TABLES_PATTERN
           
 
Method Summary
 void addClass(Class c)
          Adds a Class to the Model
 java.lang.String[] classNamesToArray()
          Returns the names of the classes of the model, as array of strings.
 Class getClass(int index)
          Returns a Class by its index
 Class getClass(java.lang.String name)
          Returns a Class by its name
 int getClassCount()
          Returns the number of classes of the model
 java.util.Vector getClassNames()
          Returns the names of the classes of the model, as Vector.
 ClassVO getClassVO(int classId)
           
 ClassVO getClassVO(java.lang.String classname)
           
 long getDescriptionId()
           
 int getModelId()
           
 java.lang.String getModelLabel()
           
 java.lang.String getModelName()
           
 Instance getNewInstance(java.lang.String classname)
          Rebuilds the model from the database
 Relation getRelation(java.lang.String relationName)
           
 long getVersion()
           
 boolean refresh()
           
 void setVersion(long version)
           
 java.lang.String toString()
          Returns a String representation of the Model
 

Field Detail

DM_CLASS_TABLES_PATTERN

static final java.lang.String DM_CLASS_TABLES_PATTERN
See Also:
Constant Field Values
Method Detail

getModelName

java.lang.String getModelName()

getModelId

int getModelId()

getDescriptionId

long getDescriptionId()

getModelLabel

java.lang.String getModelLabel()

getVersion

long getVersion()

classNamesToArray

java.lang.String[] classNamesToArray()
Returns the names of the classes of the model, as array of strings.

Returns:
the names of the classes of the model, as array of strings.

getClassNames

java.util.Vector getClassNames()
Returns the names of the classes of the model, as Vector.

Returns:
a Vector with the classnames

getClass

Class getClass(java.lang.String name)
Returns a Class by its name

Parameters:
name - Name of the Class
Returns:
a Class

getClass

Class getClass(int index)
Returns a Class by its index

Parameters:
index - Index of the Class in the Model
Returns:
a Class by index

getClassCount

int getClassCount()
Returns the number of classes of the model

Returns:
the Number of classes

addClass

void addClass(Class c)
              throws java.sql.SQLException,
                     SchemaUpdateException
Adds a Class to the Model

Parameters:
c - Class to be added
Throws:
java.sql.SQLException
SchemaUpdateException

getNewInstance

Instance getNewInstance(java.lang.String classname)
Rebuilds the model from the database


refresh

boolean refresh()
                throws java.sql.SQLException,
                       DataModelException
Throws:
java.sql.SQLException
DataModelException

toString

java.lang.String toString()
Returns a String representation of the Model

Overrides:
toString in class java.lang.Object
Returns:
the String representation of the Model

getRelation

Relation getRelation(java.lang.String relationName)

getClassVO

ClassVO getClassVO(int classId)
                   throws DataModelException
Throws:
DataModelException

getClassVO

ClassVO getClassVO(java.lang.String classname)
                   throws java.sql.SQLException,
                          DataModelException
Throws:
java.sql.SQLException
DataModelException

setVersion

void setVersion(long version)