|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stratelia.webactiv.organization.Table<ComponentInstanceRow>
com.stratelia.webactiv.organization.ComponentInstanceTable
public class ComponentInstanceTable
A ComponentInstanceTable object manages the ST_ComponentInstance table.
| Constructor Summary | |
|---|---|
ComponentInstanceTable(OrganizationSchema organization)
|
|
| Method Summary | |
|---|---|
void |
createComponentInstance(ComponentInstanceRow instance)
Inserts in the database a new instance row. |
protected ComponentInstanceRow |
fetchComponentInstance(ResultSet rs)
Fetch the current instance row from a resultSet. |
protected ComponentInstanceRow |
fetchRow(ResultSet rs)
Fetch the current space row from a resultSet. |
String[] |
getAllComponentInstanceIdsInSpace(int spaceId)
Returns all the instance ids in a given space |
ComponentInstanceRow[] |
getAllComponentInstancesInSpace(int spaceId)
Returns all the instances in a given space |
ComponentInstanceRow[] |
getAllMatchingComponentInstances(ComponentInstanceRow sampleInstance)
Returns the ComponentInstance whose fields match those of the given sample instance fields. |
ComponentInstanceRow |
getComponentInstance(int id)
Returns the instance whith the given id. |
ComponentInstanceRow |
getComponentInstanceOfUserRole(int userRoleId)
Returns the ComponentInstance of a given user role. |
ComponentInstanceRow[] |
getRemovedComponents()
Returns all components which has been removed but not definitely deleted |
boolean |
isComponentIntoBasket(int spaceId,
String name)
Check if a named component already exists in given space |
void |
moveComponentInstance(int spaceId,
int componentId)
|
protected void |
prepareInsert(String insertQuery,
PreparedStatement insert,
ComponentInstanceRow row)
Set all the parameters of the insert PreparedStatement built from the insertQuery in order to insert the given row. |
protected void |
prepareUpdate(String updateQuery,
PreparedStatement update,
ComponentInstanceRow row)
Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row. |
void |
removeComponentInstance(int id)
Delete a component instance and all his user role sets. |
void |
restoreComponentFromBasket(int id)
Remove the space from the basket Space will be available again |
void |
sendComponentToBasket(int id,
String tempLabel,
String userId)
Delete the space and all his component instances. |
void |
updateComponentInheritance(int componentId,
boolean inheritanceBlocked)
|
void |
updateComponentInstance(ComponentInstanceRow instance)
Updates in the database an instance row. |
void |
updateComponentOrder(int componentId,
int orderNum)
|
| Methods inherited from class com.stratelia.webactiv.organization.Table |
|---|
addIdToQuery, addParamToQuery, addParamToQuery, addParamToQuery, aliasColumns, getCount, getCount, getIds, getIds, getIds, getIds, getInteger, getInteger, getMatchingRows, getNextId, getRows, getRows, getRows, getRows, getUniqueRow, getUniqueRow, getUniqueRow, insertRow, performPrepareStatementParams, truncate, updateRelation, updateRelation, updateRelation, updateRow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentInstanceTable(OrganizationSchema organization)
| Method Detail |
|---|
protected ComponentInstanceRow fetchComponentInstance(ResultSet rs)
throws SQLException
rs -
SQLException
public ComponentInstanceRow getComponentInstance(int id)
throws AdminPersistenceException
id -
AdminPersistenceException
public ComponentInstanceRow getComponentInstanceOfUserRole(int userRoleId)
throws AdminPersistenceException
userRoleId -
AdminPersistenceException
public ComponentInstanceRow[] getAllComponentInstancesInSpace(int spaceId)
throws AdminPersistenceException
spaceId -
AdminPersistenceException
public String[] getAllComponentInstanceIdsInSpace(int spaceId)
throws AdminPersistenceException
spaceId -
AdminPersistenceException
public ComponentInstanceRow[] getRemovedComponents()
throws AdminPersistenceException
AdminPersistenceException
public ComponentInstanceRow[] getAllMatchingComponentInstances(ComponentInstanceRow sampleInstance)
throws AdminPersistenceException
sampleInstance -
AdminPersistenceException
public void createComponentInstance(ComponentInstanceRow instance)
throws AdminPersistenceException
instance -
AdminPersistenceException
protected void prepareInsert(String insertQuery,
PreparedStatement insert,
ComponentInstanceRow row)
throws SQLException
Table
prepareInsert in class Table<ComponentInstanceRow>SQLException
public void updateComponentOrder(int componentId,
int orderNum)
throws AdminPersistenceException
AdminPersistenceException
public void updateComponentInheritance(int componentId,
boolean inheritanceBlocked)
throws AdminPersistenceException
AdminPersistenceException
public void updateComponentInstance(ComponentInstanceRow instance)
throws AdminPersistenceException
instance -
AdminPersistenceException
public boolean isComponentIntoBasket(int spaceId,
String name)
throws AdminPersistenceException
spaceId - name -
AdminPersistenceException
public void sendComponentToBasket(int id,
String tempLabel,
String userId)
throws AdminPersistenceException
id - tempLabel - userId -
AdminPersistenceException
public void restoreComponentFromBasket(int id)
throws AdminPersistenceException
id -
AdminPersistenceException
public void moveComponentInstance(int spaceId,
int componentId)
throws AdminPersistenceException
AdminPersistenceException
protected void prepareUpdate(String updateQuery,
PreparedStatement update,
ComponentInstanceRow row)
throws SQLException
Table
prepareUpdate in class Table<ComponentInstanceRow>SQLException
public void removeComponentInstance(int id)
throws AdminPersistenceException
id -
AdminPersistenceException
protected ComponentInstanceRow fetchRow(ResultSet rs)
throws SQLException
fetchRow in class Table<ComponentInstanceRow>SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||