com.openexchange.admin.storage.mysqlStorage
Class OXGroupMySQLStorage

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXGroupStorageInterface
      extended by com.openexchange.admin.storage.sqlStorage.OXGroupSQLStorage
          extended by com.openexchange.admin.storage.mysqlStorage.OXGroupMySQLStorage
All Implemented Interfaces:
OXMySQLDefaultValues

public class OXGroupMySQLStorage
extends OXGroupSQLStorage
implements OXMySQLDefaultValues

Author:
d7

Field Summary
 
Fields inherited from interface com.openexchange.admin.storage.mysqlStorage.OXMySQLDefaultValues
NOBODY, NOGROUP
 
Constructor Summary
OXGroupMySQLStorage()
           
 
Method Summary
 void addMember(Context ctx, int groupId, User[] members)
          Adds a new member to the group.
 void change(Context ctx, Group grp)
          Edit group data
 int create(Context ctx, Group group)
          Create new group in given context
 void delete(Context ctx, Group[] groups)
          Delete group from context
 void deleteAllRecoveryData(Context ctx, Connection con)
          Deletes all recoevery data for context ctx
 void deleteRecoveryData(Context ctx, int groupId, Connection con)
          Removes entry in del_groups for group group_id and context ctx
 Group get(Context ctx, Group group)
          Get group by context and id
 Group[] getGroupsForUser(Context ctx, User user)
          Get groups for a specified user!
 User[] getMembers(Context ctx, int groupId)
          Get all members of group grp_id in context ctx
 Group[] list(Context ctx, String pattern)
          List all groups mathcing pattern in context ctx
 void removeMember(Context ctx, int groupId, User[] members)
          Removes member from group
 
Methods inherited from class com.openexchange.admin.storage.interfaces.OXGroupStorageInterface
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXGroupMySQLStorage

public OXGroupMySQLStorage()
Method Detail

addMember

public void addMember(Context ctx,
                      int groupId,
                      User[] members)
               throws StorageException
Description copied from class: OXGroupStorageInterface
Adds a new member to the group.

Specified by:
addMember in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.addMember(com.openexchange.admin.rmi.dataobjects.Context, int, User[])

change

public void change(Context ctx,
                   Group grp)
            throws StorageException
Description copied from class: OXGroupStorageInterface
Edit group data

Specified by:
change in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.change(com.openexchange.admin.rmi.dataobjects.Context, com.openexchange.admin.rmi.dataobjects.Group)

create

public int create(Context ctx,
                  Group group)
           throws StorageException
Description copied from class: OXGroupStorageInterface
Create new group in given context

Specified by:
create in class OXGroupSQLStorage
Returns:
int with the id of the created group
Throws:
StorageException
See Also:
OXGroupStorageInterface.create(com.openexchange.admin.rmi.dataobjects.Context, com.openexchange.admin.rmi.dataobjects.Group)

delete

public void delete(Context ctx,
                   Group[] groups)
            throws StorageException
Description copied from class: OXGroupStorageInterface
Delete group from context

Specified by:
delete in class OXGroupStorageInterface
Throws:
StorageException

deleteAllRecoveryData

public void deleteAllRecoveryData(Context ctx,
                                  Connection con)
                           throws StorageException
Description copied from class: OXGroupStorageInterface
Deletes all recoevery data for context ctx

Specified by:
deleteAllRecoveryData in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.deleteAllRecoveryData(com.openexchange.admin.rmi.dataobjects.Context, java.sql.Connection)

deleteRecoveryData

public void deleteRecoveryData(Context ctx,
                               int groupId,
                               Connection con)
                        throws StorageException
Description copied from class: OXGroupStorageInterface
Removes entry in del_groups for group group_id and context ctx

Specified by:
deleteRecoveryData in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.deleteRecoveryData(com.openexchange.admin.rmi.dataobjects.Context, int, java.sql.Connection)

get

public Group get(Context ctx,
                 Group group)
          throws StorageException
Description copied from class: OXGroupStorageInterface
Get group by context and id

Specified by:
get in class OXGroupStorageInterface
Throws:
StorageException

getGroupsForUser

public Group[] getGroupsForUser(Context ctx,
                                User user)
                         throws StorageException
Description copied from class: OXGroupStorageInterface
Get groups for a specified user!

Specified by:
getGroupsForUser in class OXGroupStorageInterface
Throws:
StorageException

getMembers

public User[] getMembers(Context ctx,
                         int groupId)
                  throws StorageException
Description copied from class: OXGroupStorageInterface
Get all members of group grp_id in context ctx

Specified by:
getMembers in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.getMembers(com.openexchange.admin.rmi.dataobjects.Context, int)

list

public Group[] list(Context ctx,
                    String pattern)
             throws StorageException
Description copied from class: OXGroupStorageInterface
List all groups mathcing pattern in context ctx

Specified by:
list in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.list(com.openexchange.admin.rmi.dataobjects.Context, java.lang.String)

removeMember

public void removeMember(Context ctx,
                         int groupId,
                         User[] members)
                  throws StorageException
Description copied from class: OXGroupStorageInterface
Removes member from group

Specified by:
removeMember in class OXGroupSQLStorage
Throws:
StorageException
See Also:
OXGroupStorageInterface.removeMember(com.openexchange.admin.rmi.dataobjects.Context, int, User[])