org.devaki.nextobjects.workspace.models
Class PhysicalModel

java.lang.Object
  extended byorg.devaki.nextobjects.workspace.models.BaseModel
      extended byorg.devaki.nextobjects.workspace.models.PhysicalModel
All Implemented Interfaces:
java.io.Serializable

public class PhysicalModel
extends BaseModel
implements java.io.Serializable

Physical model represent the database as it is

Author:
Emmanuel Florent
See Also:
http://www.devaki.org/pdm.html, Serialized Form

Constructor Summary
PhysicalModel(java.lang.String pName)
          Construct a new 'PhysicalModel' object
 
Method Summary
 int countConstraint()
          Return the number of constraint in the model
 int countTable()
          Return the number of tables in the model
 java.lang.String getBestFilename()
          Return the best possible filename for save
 Constraint getConstraintAt(int at)
          Return the constraint identified by the parameter in the list of constraints.
 java.util.Vector getConstraints()
          Get the list of constraints in the model
 java.util.Vector getConstraints(Table t)
          Get constraint(s) for the given table
 BaseObject[] getModelObjects()
          Conveniency method wich return all the objects in the models
 BaseModelView getModelView()
          Get the model view
 java.lang.String getSqlFile()
          Get the path for the SQL file generated from this model
 Table getTableAt(int at)
          Return the table identified by the parameter in the list of tables.
 Table getTableForId(java.lang.String pString)
          Get table for the given tableCode
 java.util.Vector getTables()
          Get the list of tables in the model
 void setPhysicalView(PhysicalView pView)
          Set the model view
 void setSqlFile(java.lang.String pSqlFile)
          Set the path for the SQL file generated from this model
 
Methods inherited from class org.devaki.nextobjects.workspace.models.BaseModel
getAlternateProjectId, getAuthorEmail, getBaseClass, getBasePeer, getBuild, getBuildDatabaseUrl, getClasses, getCompany, getContributors, getCountInstance, getCreateDatabaseUrl, getCurrentVersion, getDatabaseDriver, getDatabaseHost, getDatabasePassword, getDatabaseUser, getDbType, getDefaultIdMethod, getDefaultJavaNamingMethod, getDefaultJavaType, getDependencies, getDescription, getDevelopers, getDistributionDirectory, getDynamicTreeNode, getFileForSave, getGroupId, getHeavyIndexing, getId, getInceptionYear, getInheritanceLinkAt, getInheritanceLinks, getIssueTrackingUrl, getLabels, getLicenses, getLinks, getLocalDirectory, getLogo, getMailingLists, getName, getNotes, getOrganizationLogo, getOrganizationName, getOrganizationUrl, getPackageName, getPanel, getParentProject, getProjectProperties, getProjectURL, getProperties, getRedoLog, getRepositoryConnection, getRepositoryUrl, getSchema, getShortDescription, getSiteAddress, getSiteAdress, getSiteDirectory, isSaved, isVerified, setAlternateProjectId, setBaseClass, setBasePeer, setBuild, setBuildDatabaseUrl, setCompany, setContributors, setCreateDatabaseUrl, setCurrentVersion, setDatabaseDriver, setDatabaseHost, setDatabasePassword, setDatabaseUser, setDbType, setDefaultIdMethod, setDefaultJavaNamingMethod, setDefaultJavaType, setDependencies, setDescription, setDevelopers, setDistributionDirectory, setDynamicTreeNode, setFileForSave, setGroupId, setHeavyIndexing, setId, setInceptionYear, setIssueTrackingUrl, setLicenses, setLocalDirectory, setLogo, setMailingLists, setName, setNotes, setOrganizationLogo, setOrganizationName, setOrganizationUrl, setPackageName, setPanel, setParentProject, setProjectProperties, setProjectURL, setProperties, setRepositoryConnection, setRepositoryUrl, setSaved, setSchema, setShortDescription, setSiteAddress, setSiteDirectory, setVerified, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhysicalModel

public PhysicalModel(java.lang.String pName)
Construct a new 'PhysicalModel' object

Parameters:
pName - Nae of the model
Method Detail

getBestFilename

public final java.lang.String getBestFilename()
Return the best possible filename for save

Specified by:
getBestFilename in class BaseModel
Returns:
filename

getModelView

public final BaseModelView getModelView()
Get the model view

Specified by:
getModelView in class BaseModel
Returns:
model view

getTables

public final java.util.Vector getTables()
Get the list of tables in the model

Returns:
tables

getConstraints

public final java.util.Vector getConstraints()
Get the list of constraints in the model

Returns:
constraints

getConstraints

public final java.util.Vector getConstraints(Table t)
Get constraint(s) for the given table

Parameters:
t - the context table
Returns:
vctConstraints

getTableForId

public final Table getTableForId(java.lang.String pString)
Get table for the given tableCode

Parameters:
pString - the table code
Returns:
table

getTableAt

public final Table getTableAt(int at)
Return the table identified by the parameter in the list of tables.

Parameters:
at - index
Returns:
table

getConstraintAt

public final Constraint getConstraintAt(int at)
Return the constraint identified by the parameter in the list of constraints.

Parameters:
at - index
Returns:
constraint

countTable

public final int countTable()
Return the number of tables in the model

Returns:
count

countConstraint

public final int countConstraint()
Return the number of constraint in the model

Returns:
count

getSqlFile

public final java.lang.String getSqlFile()
Get the path for the SQL file generated from this model

Returns:
filename

setSqlFile

public final void setSqlFile(java.lang.String pSqlFile)
Set the path for the SQL file generated from this model

Parameters:
pSqlFile - filename

setPhysicalView

public final void setPhysicalView(PhysicalView pView)
Set the model view

Parameters:
pView - the model view

getModelObjects

public final BaseObject[] getModelObjects()
Conveniency method wich return all the objects in the models

Specified by:
getModelObjects in class BaseModel
Returns:
array of base objects


Copyright © 2002-2004 devaki.org. All Rights Reserved.