| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stratelia.webactiv.organization.Table<SpaceRow>
com.stratelia.webactiv.organization.SpaceTable
public class SpaceTable
A SpaceTable object manages the ST_SPACE table.
| Constructor Summary | |
|---|---|
| SpaceTable(OrganizationSchema organization) | |
| Method Summary | |
|---|---|
|  void | createSpace(SpaceRow space)Inserts in the database a new space row. | 
| protected  SpaceRow | fetchRow(ResultSet rs)Fetch the current space row from a resultSet. | 
| protected  SpaceRow | fetchSpace(ResultSet rs)Fetch the current space row from a resultSet. | 
|  String[] | getAllRootSpaceIds()Returns all the root Space ids. | 
|  String[] | getAllSpaceIds()Returns all the Space ids. | 
|  SpaceRow[] | getAllSpaces()Returns all the Spaces. | 
|  String[] | getDirectSubSpaceIds(int superSpaceId)Returns all the space ids having a given superSpace. | 
|  List<SpaceRow> | getDirectSubSpaces(int superSpaceId)Returns direct sub spaces of given space. | 
|  SpaceRow | getPersonalSpace(String userId) | 
|  SpaceRow[] | getRemovedSpaces()Returns all spaces which has been removed but not definitely deleted | 
|  SpaceRow | getSpace(int id)Returns the Space whith the given id. | 
|  SpaceRow | getSpaceOfInstance(int instanceId)Returns the Space of a given component instance. | 
|  SpaceRow | getSpaceOfSpaceUserRole(int spaceUserRoleId)Returns the Space of a given space user role. | 
|  boolean | isSpaceInstExist(int id)Tests if a space with given space id exists | 
|  boolean | isSpaceIntoBasket(int fatherId,
                  String name)Check if a named space already exists in given space | 
|  void | moveSpace(int spaceId,
          int fatherId) | 
| protected  void | prepareInsert(String insertQuery,
              PreparedStatement insert,
              SpaceRow 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,
              SpaceRow row)Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row. | 
|  void | removeSpace(int id)Delete the space and all his component instances. | 
|  void | removeSpaceFromBasket(int id)Remove the space from the basket Space will be available again | 
|  void | sendSpaceToBasket(int id,
                  String newName,
                  String userId)Delete the space and all his component instances. | 
|  void | updateSpace(SpaceRow space)Updates a space row. | 
|  void | updateSpaceOrder(int spaceId,
                 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 SpaceTable(OrganizationSchema organization)
| Method Detail | 
|---|
protected SpaceRow fetchSpace(ResultSet rs)
                       throws SQLException
rs - 
SQLException
public SpaceRow getSpace(int id)
                  throws AdminPersistenceException
id - 
AdminPersistenceException
public SpaceRow getPersonalSpace(String userId)
                          throws AdminPersistenceException
AdminPersistenceException
public boolean isSpaceInstExist(int id)
                         throws AdminPersistenceException
id - 
AdminPersistenceException
public SpaceRow[] getAllSpaces()
                        throws AdminPersistenceException
AdminPersistenceException
public String[] getAllSpaceIds()
                        throws AdminPersistenceException
AdminPersistenceException
public String[] getAllRootSpaceIds()
                            throws AdminPersistenceException
AdminPersistenceException
public SpaceRow[] getRemovedSpaces()
                            throws AdminPersistenceException
AdminPersistenceException
public SpaceRow getSpaceOfInstance(int instanceId)
                            throws AdminPersistenceException
instanceId - 
AdminPersistenceException
public String[] getDirectSubSpaceIds(int superSpaceId)
                              throws AdminPersistenceException
superSpaceId - 
AdminPersistenceException
public List<SpaceRow> getDirectSubSpaces(int superSpaceId)
                                  throws AdminPersistenceException
superSpaceId - 
AdminPersistenceException
public void createSpace(SpaceRow space)
                 throws AdminPersistenceException
space - 
AdminPersistenceException
protected void prepareInsert(String insertQuery,
                             PreparedStatement insert,
                             SpaceRow row)
                      throws SQLException
Table
prepareInsert in class Table<SpaceRow>SQLException
public void updateSpaceOrder(int spaceId,
                             int orderNum)
                      throws AdminPersistenceException
AdminPersistenceException
public void updateSpace(SpaceRow space)
                 throws AdminPersistenceException
space - 
AdminPersistenceException
protected void prepareUpdate(String updateQuery,
                             PreparedStatement update,
                             SpaceRow row)
                      throws SQLException
Table
prepareUpdate in class Table<SpaceRow>SQLException
public void moveSpace(int spaceId,
                      int fatherId)
               throws AdminPersistenceException
AdminPersistenceException
public void removeSpace(int id)
                 throws AdminPersistenceException
id - 
AdminPersistenceException
public void sendSpaceToBasket(int id,
                              String newName,
                              String userId)
                       throws AdminPersistenceException
id - newName - userId - 
AdminPersistenceException
public boolean isSpaceIntoBasket(int fatherId,
                                 String name)
                          throws AdminPersistenceException
fatherId - name - 
AdminPersistenceException
public void removeSpaceFromBasket(int id)
                           throws AdminPersistenceException
id - 
AdminPersistenceException
public SpaceRow getSpaceOfSpaceUserRole(int spaceUserRoleId)
                                 throws AdminPersistenceException
spaceUserRoleId - 
AdminPersistenceException
protected SpaceRow fetchRow(ResultSet rs)
                     throws SQLException
fetchRow in class Table<SpaceRow>SQLException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||