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 grp_id, User[] members)
          Adds a new member to the group.
 void change(Context ctx, Group grp)
          Edit group data
 int create(Context ctx, Group grp)
          Create new group in given context
 void delete(Context ctx, Group[] grps)
          Delete group from context
 void deleteAllRecoveryData(Context ctx, java.sql.Connection con)
          Deletes all recoevery data for context ctx
 void deleteRecoveryData(Context ctx, int group_id, java.sql.Connection con)
          Removes entry in del_groups for group group_id and context ctx
 Group get(Context ctx, Group grp)
          Get group by context and id
 Group[] getGroupsForUser(Context ctx, User usr)
          Get groups for a specified user!
 User[] getMembers(Context ctx, int grp_id)
          Get all members of group grp_id in context ctx
 Group[] list(Context ctx, java.lang.String pattern)
          List all groups mathcing pattern in context ctx
 void removeMember(Context ctx, int grp_id, 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 grp_id,
                      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 grp)
           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[] grps)
            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,
                                  java.sql.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 group_id,
                               java.sql.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 grp)
          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 usr)
                         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 grp_id)
                  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,
                    java.lang.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 grp_id,
                         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[])