com.openexchange.admin.storage.sqlStorage
Class OXToolSQLStorage

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXToolStorageInterface
      extended by com.openexchange.admin.storage.sqlStorage.OXToolSQLStorage
Direct Known Subclasses:
OXToolMySQLStorage

public abstract class OXToolSQLStorage
extends OXToolStorageInterface

TODO remove this class because it has no functionality at all.

Author:
d7, cutmasta

Constructor Summary
OXToolSQLStorage()
           
 
Method Summary
abstract  boolean existsContext(Context ctx)
          Although this method get's a context Object it will only look after the cid
abstract  boolean existsContextLoginMappings(Context ctx)
           
abstract  boolean existsContextLoginMappings(Context ctx, Connection configdb_connection)
           
abstract  boolean existsDatabase(int db_id)
           
abstract  boolean existsDatabaseName(String db_name)
          Checks if given name is already used!Should be used in create method!
abstract  boolean existsGroup(Context ctx, int gid)
           
abstract  boolean existsGroup(Context ctx, int[] gid)
           
abstract  boolean existsGroupMember(Context ctx, int group_ID, int member_ID)
           
abstract  boolean existsGroupMember(Context ctx, int group_ID, int[] user_ids)
           
abstract  boolean existsGroupName(Context ctx, String identifier)
          Checks if given name is already used for a group in given context.Should be used in create method!
abstract  boolean existsReason(int rid)
           
abstract  boolean existsReason(String reason)
           
abstract  boolean existsResource(Context ctx, int resource_id)
           
abstract  boolean existsResourceAddress(Context ctx, String address)
           
abstract  boolean existsResourceName(Context ctx, String identifier)
          Checks if given name is already used for resource in given context!Should be used in create method!
abstract  boolean existsServer(int server_id)
           
abstract  boolean existsServerID(int check_ID, String table, String field)
           
abstract  boolean existsServerName(String server_name)
          Checks if given name is already used!Should be used in create method!
abstract  boolean existsStore(int store_id)
           
abstract  boolean existsStore(String url)
           
abstract  boolean existsUser(Context ctx, int uid)
           
abstract  boolean existsUser(Context ctx, int[] user_ids)
           
abstract  boolean existsUserName(Context ctx, String username)
          Checks if given name is already used for an user in given context.Should be used in create method!
abstract  int getAdminForContext(Context ctx, Connection con)
           
abstract  int getDefaultGroupForContext(Context ctx, Connection con)
           
abstract  int getDefaultGroupForContextWithOutConnection(Context ctx)
           
abstract  int getGidNumberOfGroup(Context ctx, int group_id, Connection con)
          Gets the system's GID for specified group.
abstract  boolean isContextAdmin(Context ctx, int user_id)
           
abstract  boolean isContextEnabled(Context ctx)
           
abstract  boolean isMasterDatabase(int database_id)
           
abstract  boolean poolInUse(int pool_id)
           
abstract  boolean serverInUse(int server_id)
           
abstract  boolean storeInUse(int store_id)
           
 
Methods inherited from class com.openexchange.admin.storage.interfaces.OXToolStorageInterface
checkAndUpdateSchemaIfRequired, checkAndUpdateSchemaIfRequired, checkCreateUserData, checkValidEmailsInUserObject, domainInUse, domainInUseByGroup, domainInUseByResource, domainInUseByUser, existsContextName, existsContextName, existsDatabaseName, existsDisplayName, existsGroup, existsGroup, existsGroup, existsGroupMember, existsGroupName, existsResourceAddress, existsResourceName, existsServerName, existsUser, existsUser, existsUserName, getAdminForContext, getContextIDByContextname, getDatabaseIDByDatabasename, getGroupIDByGroupname, getGroupnameByGroupID, getInstance, getResourceIDByResourcename, getResourcenameByResourceID, getServerIDByServername, getUserIDByUsername, getUsernameByUserID, isContextAdmin, isUserSettingMailBitSet, primaryMailExists, schemaBeingLockedOrNeedsUpdate, setUserSettingMailBit, unsetUserSettingMailBit, validateUserName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXToolSQLStorage

public OXToolSQLStorage()
Method Detail

existsContext

public abstract boolean existsContext(Context ctx)
                               throws StorageException
Description copied from class: OXToolStorageInterface
Although this method get's a context Object it will only look after the cid

Specified by:
existsContext in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsContext(int)

existsDatabase

public abstract boolean existsDatabase(int db_id)
                                throws StorageException
Specified by:
existsDatabase in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsDatabase(int)

existsDatabaseName

public abstract boolean existsDatabaseName(String db_name)
                                    throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used!Should be used in create method!

Specified by:
existsDatabaseName in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
OXToolStorageInterface.existsDatabaseName(java.lang.String)

existsGroup

public abstract boolean existsGroup(Context ctx,
                                    int gid)
                             throws StorageException
Specified by:
existsGroup in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int, int)

existsContextLoginMappings

public abstract boolean existsContextLoginMappings(Context ctx,
                                                   Connection configdb_connection)
                                            throws StorageException
Specified by:
existsContextLoginMappings in class OXToolStorageInterface
Throws:
StorageException

existsContextLoginMappings

public abstract boolean existsContextLoginMappings(Context ctx)
                                            throws StorageException
Specified by:
existsContextLoginMappings in class OXToolStorageInterface
Throws:
StorageException

existsGroup

public abstract boolean existsGroup(Context ctx,
                                    int[] gid)
                             throws StorageException
Specified by:
existsGroup in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroup(int, int[])

existsGroupName

public abstract boolean existsGroupName(Context ctx,
                                        String identifier)
                                 throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for a group in given context.Should be used in create method!

Specified by:
existsGroupName in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupName(int, java.lang.String)

existsGroupMember

public abstract boolean existsGroupMember(Context ctx,
                                          int group_ID,
                                          int[] user_ids)
                                   throws StorageException
Specified by:
existsGroupMember in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int, int, int[])

existsGroupMember

public abstract boolean existsGroupMember(Context ctx,
                                          int group_ID,
                                          int member_ID)
                                   throws StorageException
Specified by:
existsGroupMember in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsGroupMember(int, int, int)

existsReason

public abstract boolean existsReason(int rid)
                              throws StorageException
Specified by:
existsReason in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsReason(int)

existsReason

public abstract boolean existsReason(String reason)
                              throws StorageException
Specified by:
existsReason in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsReason(java.lang.String)

existsResourceAddress

public abstract boolean existsResourceAddress(Context ctx,
                                              String address)
                                       throws StorageException
Specified by:
existsResourceAddress in class OXToolStorageInterface
Throws:
StorageException

existsResourceName

public abstract boolean existsResourceName(Context ctx,
                                           String identifier)
                                    throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for resource in given context!Should be used in create method!

Specified by:
existsResourceName in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int, java.lang.String, int)

existsResource

public abstract boolean existsResource(Context ctx,
                                       int resource_id)
                                throws StorageException
Specified by:
existsResource in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsResource(int, int)

existsServer

public abstract boolean existsServer(int server_id)
                              throws StorageException
Specified by:
existsServer in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServer(int)

existsServerName

public abstract boolean existsServerName(String server_name)
                                  throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used!Should be used in create method!

Specified by:
existsServerName in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServerName(java.lang.String)

existsServerID

public abstract boolean existsServerID(int check_ID,
                                       String table,
                                       String field)
                                throws StorageException
Specified by:
existsServerID in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsServerID(int, java.lang.String, java.lang.String)

existsStore

public abstract boolean existsStore(int store_id)
                             throws StorageException
Specified by:
existsStore in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsStore(int)

existsStore

public abstract boolean existsStore(String url)
                             throws StorageException
Specified by:
existsStore in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.existsStore(java.lang.String)

existsUserName

public abstract boolean existsUserName(Context ctx,
                                       String username)
                                throws StorageException
Description copied from class: OXToolStorageInterface
Checks if given name is already used for an user in given context.Should be used in create method!

Specified by:
existsUserName in class OXToolStorageInterface
Returns:
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUserName(int, java.lang.String)

existsUser

public abstract boolean existsUser(Context ctx,
                                   int uid)
                            throws StorageException
Specified by:
existsUser in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int, int)

existsUser

public abstract boolean existsUser(Context ctx,
                                   int[] user_ids)
                            throws StorageException
Specified by:
existsUser in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#existsUser(int, int[])

getAdminForContext

public abstract int getAdminForContext(Context ctx,
                                       Connection con)
                                throws StorageException
Specified by:
getAdminForContext in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getAdminForContext(int, java.sql.Connection)

getDefaultGroupForContext

public abstract int getDefaultGroupForContext(Context ctx,
                                              Connection con)
                                       throws StorageException
Specified by:
getDefaultGroupForContext in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#getDefaultGroupForContext(int, java.sql.Connection)

getDefaultGroupForContextWithOutConnection

public abstract int getDefaultGroupForContextWithOutConnection(Context ctx)
                                                        throws StorageException
Specified by:
getDefaultGroupForContextWithOutConnection in class OXToolStorageInterface
Throws:
StorageException

getGidNumberOfGroup

public abstract int getGidNumberOfGroup(Context ctx,
                                        int group_id,
                                        Connection con)
                                 throws StorageException
Description copied from class: OXToolStorageInterface
Gets the system's GID for specified group.

Specified by:
getGidNumberOfGroup in class OXToolStorageInterface
Parameters:
ctx - The context
group_id - The group ID
con - A connection with at least read-only permission
Returns:
The system's GID for specified group or -1 if no GID is set.
Throws:
StorageException - If a storage error occurs or group does not exist

isContextAdmin

public abstract boolean isContextAdmin(Context ctx,
                                       int user_id)
                                throws StorageException
Specified by:
isContextAdmin in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextAdmin(int, int)

isContextEnabled

public abstract boolean isContextEnabled(Context ctx)
                                  throws StorageException
Specified by:
isContextEnabled in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#isContextEnabled(int)

isMasterDatabase

public abstract boolean isMasterDatabase(int database_id)
                                  throws StorageException
Specified by:
isMasterDatabase in class OXToolStorageInterface
Throws:
StorageException
See Also:
OXToolStorageInterface.isMasterDatabase(int)

poolInUse

public abstract boolean poolInUse(int pool_id)
                           throws StorageException
Specified by:
poolInUse in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#poolInUse(long)

serverInUse

public abstract boolean serverInUse(int server_id)
                             throws StorageException
Specified by:
serverInUse in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#serverInUse(long)

storeInUse

public abstract boolean storeInUse(int store_id)
                            throws StorageException
Specified by:
storeInUse in class OXToolStorageInterface
Throws:
StorageException
See Also:
com.openexchange.admin.storage.interfaces.OXToolStorageInterface#storeInUse(long)