com.gentics.api.lib.datasource
Interface WriteableDatasource

All Superinterfaces:
Cloneable, Datasource
All Known Subinterfaces:
WriteableVersioningDatasource

public interface WriteableDatasource
extends Datasource

Interface for Datasources that allow data modifications.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.gentics.api.lib.datasource.Datasource
Datasource.Sorting
 
Field Summary
 
Fields inherited from interface com.gentics.api.lib.datasource.Datasource
SORTORDER_ASC, SORTORDER_DESC, SORTORDER_NONE
 
Method Summary
 boolean canWrite()
          Checks if the Datasource is allowed to write to the underlying Datastorage
 Changeable create(Map objectParameters)
          Create a new object that can be stored in this datasource.
 DatasourceInfo delete(Collection objects)
          Deletes a collection of objects
 DatasourceInfo delete(Collection objects, GenticsUser user)
          Deprecated. methods with GenticsUser are deprecated, use delete(Collection) instead.
 DatasourceInfo delete(DatasourceFilter filter)
          Deletes all objects found with the given filter.
 DatasourceInfo delete(DatasourceRecordSet rst)
          Deprecated. use delete(Collection) instead
 DatasourceInfo delete(DatasourceRecordSet rst, GenticsUser user)
          Deprecated. methods with GenticsUser are deprecated, use delete(Collection) instead.
 DatasourceInfo insert(Collection objects)
          Insert a collection of objects
 DatasourceInfo insert(Collection objects, GenticsUser user)
          Deprecated. methods with GenticsUser are deprecated, use insert(Collection)
 DatasourceInfo insert(DatasourceRecordSet rst)
          Deprecated. use insert(Collection) instead
 DatasourceInfo insert(DatasourceRecordSet rst, GenticsUser user)
          Deprecated. methods with GenticsUser are deprecated, use insert(Collection)
 DatasourceInfo store(Collection objects)
          Store a collection of objects.
 DatasourceInfo store(Collection objects, GenticsUser user)
          Deprecated. Methods with GenticsUser are deprecated. use store(Collection)
 DatasourceInfo store(DatasourceRecordSet rst)
          Deprecated. Use store(Collection) instead
 DatasourceInfo store(DatasourceRecordSet rst, GenticsUser user)
          Deprecated. Methods with GenticsUser are deprecated. use store(Collection)
 DatasourceInfo update(Collection objects)
          Update a collection of objects
 DatasourceInfo update(Collection objects, GenticsUser user)
          Deprecated. Methods with GenticsUser are deprecated, use update(Collection)
 DatasourceInfo update(DatasourceRecordSet rst)
          Deprecated. use update(Collection) instead.
 DatasourceInfo update(DatasourceRecordSet rst, GenticsUser user)
          Deprecated. Methods with GenticsUser are deprecated, use update(Collection)
 
Methods inherited from interface com.gentics.api.lib.datasource.Datasource
clone, createDatasourceFilter, getCount, getCount, getCount, getCount2, getHandlePool, getId, getResult, getResult, getResult, getResult, getResult, getResult, getResult, hasChanged, hasChanged, isValidAttribute, setAttributeNames, setRuleTree
 

Method Detail

canWrite

boolean canWrite()
Checks if the Datasource is allowed to write to the underlying Datastorage

Returns:
true when data modifications are allowed, false if not

store

DatasourceInfo store(DatasourceRecordSet rst)
                     throws DatasourceException
Deprecated. Use store(Collection) instead

Store the objects given in the DatasourceRecordSet (does either "insert" or "update" depending on whether the object already exists in the Datasource or not)

Parameters:
rst - recordset holding the objects to be stored
Returns:
DatasourceInfo object holding the store results
Throws:
DatasourceException

store

DatasourceInfo store(DatasourceRecordSet rst,
                     GenticsUser user)
                     throws DatasourceException
Deprecated. Methods with GenticsUser are deprecated. use store(Collection)

Store the objects given in the DatasourceRecordSet (does either "insert" or "update" depending on whether the object already exists in the Datasource or not)

Parameters:
rst - recordset holding the data to store
user - user who performs the storing (may be null)
Returns:
datasourceinfo holding info about storing results
Throws:
DatasourceException

store

DatasourceInfo store(Collection objects)
                     throws DatasourceException
Store a collection of objects.

Parameters:
objects - collection of objects to store
Returns:
datasource info holding the info about storing results
Throws:
DatasourceException

store

DatasourceInfo store(Collection objects,
                     GenticsUser user)
                     throws DatasourceException
Deprecated. Methods with GenticsUser are deprecated. use store(Collection)

Store a collection of objects.

Parameters:
objects - collection of objects to store
user - user who preforms the store (may be null)
Returns:
datasource info holding the info about storing results
Throws:
DatasourceException

update

DatasourceInfo update(DatasourceRecordSet rst)
                      throws DatasourceException
Deprecated. use update(Collection) instead.

Update objects in the given DatasourceRecordSet

Parameters:
rst - record set holding the objects to be updated
Returns:
DatasourceInfo holding information about the updates
Throws:
DatasourceException

update

DatasourceInfo update(DatasourceRecordSet rst,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. Methods with GenticsUser are deprecated, use update(Collection)

Update objects in the given DatasourceRecordSet

Parameters:
rst - recordset holding the data to update
user - use who performs the update (may be null)
Returns:
datasourceinfo holding info about update results
Throws:
DatasourceException

update

DatasourceInfo update(Collection objects)
                      throws DatasourceException
Update a collection of objects

Parameters:
objects - collection of objects to update
Returns:
datasource info
Throws:
DatasourceException

update

DatasourceInfo update(Collection objects,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. Methods with GenticsUser are deprecated, use update(Collection)

Update a collection of objects

Parameters:
objects - collection of objects to update
user - user who performs the update (may be null)
Returns:
datasource info
Throws:
DatasourceException

insert

DatasourceInfo insert(DatasourceRecordSet rst)
                      throws DatasourceException
Deprecated. use insert(Collection) instead

Insert new objects given in the DatasourceRecordSet into the Datasource

Parameters:
rst - recordset holding new objects to be inserted
Returns:
information about the insert results
Throws:
DatasourceException

insert

DatasourceInfo insert(Collection objects)
                      throws DatasourceException
Insert a collection of objects

Parameters:
objects - collection of objects to insert
Returns:
datasource info
Throws:
DatasourceException

insert

DatasourceInfo insert(DatasourceRecordSet rst,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. methods with GenticsUser are deprecated, use insert(Collection)

Insert new objects given in the DatasourceRecordSet into the Datasource

Parameters:
rst - recordset holding new objects to be inserted
user - user who performs the insert
Returns:
information about the insert results
Throws:
DatasourceException

insert

DatasourceInfo insert(Collection objects,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. methods with GenticsUser are deprecated, use insert(Collection)

Insert a collection of objects

Parameters:
objects - collection of objects to insert
user - user who performs the insert (may be null)
Returns:
datasource info
Throws:
DatasourceException

delete

DatasourceInfo delete(DatasourceRecordSet rst)
                      throws DatasourceException
Deprecated. use delete(Collection) instead

Deletes the objects in the given DatasourceRecordSet from the Datasource

Parameters:
rst - containing the rows to delete
Returns:
a datasource info containing the number of affected rows.
Throws:
DatasourceException

delete

DatasourceInfo delete(Collection objects)
                      throws DatasourceException
Deletes a collection of objects

Parameters:
objects - collection of objects to delete
Returns:
a datasource info containing the number of affected rows.
Throws:
DatasourceException

delete

DatasourceInfo delete(DatasourceRecordSet rst,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. methods with GenticsUser are deprecated, use delete(Collection) instead.

Deletes the rows in the given recordset

Parameters:
rst - containing the rows to delete
user - user who performs the delete (may be null)
Returns:
a datasource info containing the number of affected rows.
Throws:
DatasourceException

delete

DatasourceInfo delete(Collection objects,
                      GenticsUser user)
                      throws DatasourceException
Deprecated. methods with GenticsUser are deprecated, use delete(Collection) instead.

Deletes a collection of objects

Parameters:
objects - collection of objects to delete
user - user who performs the delete (may be null)
Returns:
a datasource info containing the number of affected rows.
Throws:
DatasourceException

delete

DatasourceInfo delete(DatasourceFilter filter)
                      throws DatasourceException
Deletes all objects found with the given filter.

Parameters:
filter - the filter defining which objets to delete.
Returns:
a datasource info containing the number of affected rows.
Throws:
DatasourceException

create

Changeable create(Map objectParameters)
                  throws DatasourceException
Create a new object that can be stored in this datasource. The object will be created but not yet stored in the datasource.

Parameters:
objectParameters - datasource implementation specific object parameters
Returns:
the create object as Changeable
Throws:
DatasourceException - when the creation fails


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.