de.uplanet.lucy.server.usermanager.usecases
Interface IDsucObject

All Known Subinterfaces:
IDsucDistList, IDsucGroup, IDsucRole, IDsucSet, IDsucUser

public interface IDsucObject

Version:
$Revision: 86610 $

Method Summary
 void append(de.uplanet.jdbc.JdbcConnection p_conn, IDsRecord p_record)
          insert a new record
 void delete(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
           
 IDsRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn, int p_iTypeId, java.lang.String p_strGuid)
           
 IDsRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strTypeId, java.lang.String p_strGuid)
           
 java.lang.String getLastSQLStatement()
           
 int guidToId(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid, int p_iType)
           
 java.lang.String idToGuid(de.uplanet.jdbc.JdbcConnection p_conn, int p_iID)
           
 void move(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid, java.lang.String p_strToContainerGuid)
           
 java.util.List<IDsObjectRecord> select(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
          Select all objects in the ds manager.
 int selectCount(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
          returns the count of records
 IDsObjectRecord selectFullObject(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
          if a record is found, a valid type record instance is returned.
 java.util.List<IDsObjectRecord> selectObject(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
          return a list of records.
 IDsObjectRecord selectObject(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid)
          If a record is found, a valid type record instance is returned.
 IDsObjectRecord selectObject(de.uplanet.jdbc.JdbcConnection p_conn, java.lang.String p_strGuid, java.lang.String... p_fieldGuids)
          If a record is found, a valid type record instance is returned.
 int selectObjectCount(de.uplanet.jdbc.JdbcConnection p_conn, IDsSelectFilter p_filter)
           
 void update(de.uplanet.jdbc.JdbcConnection p_conn, IDsRecord p_record)
          Updates an existing record.
 

Method Detail

fromGuid

IDsRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn,
                   int p_iTypeId,
                   java.lang.String p_strGuid)
                   throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_iTypeId - the object type id (-1 the base object type is used)
p_strGuid - The record guid
Returns:
a valid record instance or null if not found.
Throws:
java.sql.SQLException

fromGuid

IDsRecord fromGuid(de.uplanet.jdbc.JdbcConnection p_conn,
                   java.lang.String p_strTypeId,
                   java.lang.String p_strGuid)
                   throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_strTypeId - The type id
p_strGuid - The record guid
Returns:
a valid record instance or null if not found
Throws:
java.sql.SQLException

append

void append(de.uplanet.jdbc.JdbcConnection p_conn,
            IDsRecord p_record)
            throws java.sql.SQLException
insert a new record

Parameters:
p_conn - The database connection
p_record - the record, that will be inserted
Throws:
java.sql.SQLException

update

void update(de.uplanet.jdbc.JdbcConnection p_conn,
            IDsRecord p_record)
            throws java.sql.SQLException
Updates an existing record. If update fails, or physical record doesn't exist a DsRuntimeException will be thrown.

Parameters:
p_conn - The database connection
p_record - The record
Throws:
java.sql.SQLException
java.io.IOException

delete

void delete(de.uplanet.jdbc.JdbcConnection p_conn,
            java.lang.String p_strGuid)
            throws java.sql.SQLException,
                   DsException
Parameters:
p_conn - The database connection
p_strGuid - The record guid
Throws:
java.sql.SQLException
DsException

move

void move(de.uplanet.jdbc.JdbcConnection p_conn,
          java.lang.String p_strGuid,
          java.lang.String p_strToContainerGuid)
          throws java.sql.SQLException,
                 DsException
Parameters:
p_conn - must not be null
p_strGuid - must not be null (and record must exist)
p_strToContainerGuid - can be null to move out record out of a contianer
Throws:
java.sql.SQLException
java.io.IOException
DsException

selectCount

int selectCount(de.uplanet.jdbc.JdbcConnection p_conn,
                IDsSelectFilter p_filter)
                throws java.sql.SQLException
returns the count of records

Parameters:
p_conn - The database connection
p_filter - The filter (could be null)
Returns:
the count of records
Throws:
java.sql.SQLException
java.io.IOException

select

java.util.List<IDsObjectRecord> select(de.uplanet.jdbc.JdbcConnection p_conn,
                                       IDsSelectFilter p_filter)
                                       throws java.sql.SQLException
Select all objects in the ds manager. Beware to use without a filter, because the returned list size can be very big.

Parameters:
p_conn - The database connection
p_filter - The filter (could be null)
Returns:
list of records
Throws:
java.sql.SQLException

selectObjectCount

int selectObjectCount(de.uplanet.jdbc.JdbcConnection p_conn,
                      IDsSelectFilter p_filter)
                      throws java.sql.SQLException
Parameters:
p_conn - The database connection
p_filter - The filter (could be null)
Returns:
the count of records
Throws:
java.sql.SQLException
java.io.IOException

selectObject

java.util.List<IDsObjectRecord> selectObject(de.uplanet.jdbc.JdbcConnection p_conn,
                                             IDsSelectFilter p_filter)
                                             throws java.sql.SQLException
return a list of records.

Parameters:
p_conn - The database connection
p_filter - The filter
Returns:
list of records or an empty list if nothing is found. an record item of the list is of the correct record object instance. e.q. for a user type in the list, the list item is a instance of a IDsUserRecord object.
Throws:
java.sql.SQLException

selectFullObject

IDsObjectRecord selectFullObject(de.uplanet.jdbc.JdbcConnection p_conn,
                                 java.lang.String p_strGuid)
                                 throws java.sql.SQLException
if a record is found, a valid type record instance is returned. e.q. for an container a IDsContainerRecord object. ALl fields from the DSObject are set. fields from a dsuser for example are not set.

Parameters:
p_conn - The database connection
p_strGuid - The guid
Returns:
null if not found or a instance of an derived IDsObjectRecord object.
Throws:
java.sql.SQLException

selectObject

IDsObjectRecord selectObject(de.uplanet.jdbc.JdbcConnection p_conn,
                             java.lang.String p_strGuid)
                             throws java.sql.SQLException
If a record is found, a valid type record instance is returned. e.q. for an container a IDsContainerRecord object. The id, guid, type, containerid and name attributes are set.

Parameters:
p_conn - The database connection
p_strGuid - The guid
Returns:
null if not found or a instance of an derived IDsObjectRecord object.
Throws:
java.sql.SQLException

selectObject

IDsObjectRecord selectObject(de.uplanet.jdbc.JdbcConnection p_conn,
                             java.lang.String p_strGuid,
                             java.lang.String... p_fieldGuids)
                             throws java.sql.SQLException
If a record is found, a valid type record instance is returned. e.q. for an container a IDsContainerRecord object. The id, guid, type, containerid and name attributes are set + the attributes given by the fieldGuids.

Parameters:
p_conn - The database connection
p_strGuid - The guid
p_fieldGuids - Array of field guids
Returns:
null if not found or a instance of an derived IDsObjectRecord object.
Throws:
java.sql.SQLException

idToGuid

java.lang.String idToGuid(de.uplanet.jdbc.JdbcConnection p_conn,
                          int p_iID)
                          throws java.sql.SQLException
Parameters:
p_conn - The database connections
p_iID - The id to map
Returns:
The mapped guid.
Throws:
java.sql.SQLException

guidToId

int guidToId(de.uplanet.jdbc.JdbcConnection p_conn,
             java.lang.String p_strGuid,
             int p_iType)
             throws java.sql.SQLException,
                    DsException
Parameters:
p_conn - The connection
p_strGuid - The guid
p_iType - -1 if type should not check, otherwise the type of the record is checked. if checked and the returned type is not p_iType or the p_iType is not deriveable, a DSRuntimeExcepiton is thrown
Returns:
the id or -1 if not found
Throws:
java.sql.SQLException
{@link - DsException}
DsException

getLastSQLStatement

java.lang.String getLastSQLStatement()
Returns:
The last sql statement.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.