Liferay 7.0-ce-m3

com.liferay.portlet.dynamicdatamapping.service.persistence
Class DDMStructureVersionUtil

java.lang.Object
  extended by com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureVersionUtil

@ProviderType
public class DDMStructureVersionUtil
extends Object

The persistence utility for the d d m structure version service. This utility wraps DDMStructureVersionPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
DDMStructureVersionPersistence, DDMStructureVersionPersistenceImpl

Constructor Summary
DDMStructureVersionUtil()
           
 
Method Summary
static void cacheResult(DDMStructureVersion ddmStructureVersion)
          Caches the d d m structure version in the entity cache if it is enabled.
static void cacheResult(List<DDMStructureVersion> ddmStructureVersions)
          Caches the d d m structure versions in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(DDMStructureVersion ddmStructureVersion)
           
static int countAll()
          Returns the number of d d m structure versions.
static int countByS_V(long structureId, String version)
          Returns the number of d d m structure versions where structureId = ? and version = ?.
static int countByStructureId(long structureId)
          Returns the number of d d m structure versions where structureId = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static DDMStructureVersion create(long structureVersionId)
          Creates a new d d m structure version with the primary key.
static DDMStructureVersion fetchByPrimaryKey(long structureVersionId)
          Returns the d d m structure version with the primary key or returns null if it could not be found.
static Map<Serializable,DDMStructureVersion> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
           
static DDMStructureVersion fetchByS_V(long structureId, String version)
          Returns the d d m structure version where structureId = ? and version = ? or returns null if it could not be found.
static DDMStructureVersion fetchByS_V(long structureId, String version, boolean retrieveFromCache)
          Returns the d d m structure version where structureId = ? and version = ? or returns null if it could not be found, optionally using the finder cache.
static DDMStructureVersion fetchByStructureId_First(long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns the first d d m structure version in the ordered set where structureId = ?.
static DDMStructureVersion fetchByStructureId_Last(long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns the last d d m structure version in the ordered set where structureId = ?.
static List<DDMStructureVersion> findAll()
          Returns all the d d m structure versions.
static List<DDMStructureVersion> findAll(int start, int end)
          Returns a range of all the d d m structure versions.
static List<DDMStructureVersion> findAll(int start, int end, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns an ordered range of all the d d m structure versions.
static DDMStructureVersion findByPrimaryKey(long structureVersionId)
          Returns the d d m structure version with the primary key or throws a NoSuchStructureVersionException if it could not be found.
static DDMStructureVersion findByS_V(long structureId, String version)
          Returns the d d m structure version where structureId = ? and version = ? or throws a NoSuchStructureVersionException if it could not be found.
static DDMStructureVersion findByStructureId_First(long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns the first d d m structure version in the ordered set where structureId = ?.
static DDMStructureVersion findByStructureId_Last(long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns the last d d m structure version in the ordered set where structureId = ?.
static DDMStructureVersion[] findByStructureId_PrevAndNext(long structureVersionId, long structureId, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns the d d m structure versions before and after the current d d m structure version in the ordered set where structureId = ?.
static List<DDMStructureVersion> findByStructureId(long structureId)
          Returns all the d d m structure versions where structureId = ?.
static List<DDMStructureVersion> findByStructureId(long structureId, int start, int end)
          Returns a range of all the d d m structure versions where structureId = ?.
static List<DDMStructureVersion> findByStructureId(long structureId, int start, int end, OrderByComparator<DDMStructureVersion> orderByComparator)
          Returns an ordered range of all the d d m structure versions where structureId = ?.
static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<DDMStructureVersion> orderByComparator)
           
static DDMStructureVersionPersistence getPersistence()
           
static DDMStructureVersion remove(long structureVersionId)
          Removes the d d m structure version with the primary key from the database.
static void removeAll()
          Removes all the d d m structure versions from the database.
static DDMStructureVersion removeByS_V(long structureId, String version)
          Removes the d d m structure version where structureId = ? and version = ? from the database.
static void removeByStructureId(long structureId)
          Removes all the d d m structure versions where structureId = ? from the database.
 void setPersistence(DDMStructureVersionPersistence persistence)
          Deprecated. As of 6.2.0
static DDMStructureVersion update(DDMStructureVersion ddmStructureVersion)
           
static DDMStructureVersion update(DDMStructureVersion ddmStructureVersion, ServiceContext serviceContext)
           
static DDMStructureVersion updateImpl(DDMStructureVersion ddmStructureVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDMStructureVersionUtil

public DDMStructureVersionUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(DDMStructureVersion ddmStructureVersion)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery)
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                             int start,
                                                             int end)
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<DDMStructureVersion> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                             int start,
                                                             int end,
                                                             OrderByComparator<DDMStructureVersion> orderByComparator)
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static DDMStructureVersion update(DDMStructureVersion ddmStructureVersion)
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel)

update

public static DDMStructureVersion update(DDMStructureVersion ddmStructureVersion,
                                         ServiceContext serviceContext)
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)

findByStructureId

public static List<DDMStructureVersion> findByStructureId(long structureId)
Returns all the d d m structure versions where structureId = ?.

Parameters:
structureId - the structure ID
Returns:
the matching d d m structure versions

findByStructureId

public static List<DDMStructureVersion> findByStructureId(long structureId,
                                                          int start,
                                                          int end)
Returns a range of all the d d m structure versions where structureId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureVersionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
structureId - the structure ID
start - the lower bound of the range of d d m structure versions
end - the upper bound of the range of d d m structure versions (not inclusive)
Returns:
the range of matching d d m structure versions

findByStructureId

public static List<DDMStructureVersion> findByStructureId(long structureId,
                                                          int start,
                                                          int end,
                                                          OrderByComparator<DDMStructureVersion> orderByComparator)
Returns an ordered range of all the d d m structure versions where structureId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureVersionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
structureId - the structure ID
start - the lower bound of the range of d d m structure versions
end - the upper bound of the range of d d m structure versions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching d d m structure versions

findByStructureId_First

public static DDMStructureVersion findByStructureId_First(long structureId,
                                                          OrderByComparator<DDMStructureVersion> orderByComparator)
                                                   throws NoSuchStructureVersionException
Returns the first d d m structure version in the ordered set where structureId = ?.

Parameters:
structureId - the structure ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching d d m structure version
Throws:
NoSuchStructureVersionException - if a matching d d m structure version could not be found

fetchByStructureId_First

public static DDMStructureVersion fetchByStructureId_First(long structureId,
                                                           OrderByComparator<DDMStructureVersion> orderByComparator)
Returns the first d d m structure version in the ordered set where structureId = ?.

Parameters:
structureId - the structure ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching d d m structure version, or null if a matching d d m structure version could not be found

findByStructureId_Last

public static DDMStructureVersion findByStructureId_Last(long structureId,
                                                         OrderByComparator<DDMStructureVersion> orderByComparator)
                                                  throws NoSuchStructureVersionException
Returns the last d d m structure version in the ordered set where structureId = ?.

Parameters:
structureId - the structure ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching d d m structure version
Throws:
NoSuchStructureVersionException - if a matching d d m structure version could not be found

fetchByStructureId_Last

public static DDMStructureVersion fetchByStructureId_Last(long structureId,
                                                          OrderByComparator<DDMStructureVersion> orderByComparator)
Returns the last d d m structure version in the ordered set where structureId = ?.

Parameters:
structureId - the structure ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching d d m structure version, or null if a matching d d m structure version could not be found

findByStructureId_PrevAndNext

public static DDMStructureVersion[] findByStructureId_PrevAndNext(long structureVersionId,
                                                                  long structureId,
                                                                  OrderByComparator<DDMStructureVersion> orderByComparator)
                                                           throws NoSuchStructureVersionException
Returns the d d m structure versions before and after the current d d m structure version in the ordered set where structureId = ?.

Parameters:
structureVersionId - the primary key of the current d d m structure version
structureId - the structure ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next d d m structure version
Throws:
NoSuchStructureVersionException - if a d d m structure version with the primary key could not be found

removeByStructureId

public static void removeByStructureId(long structureId)
Removes all the d d m structure versions where structureId = ? from the database.

Parameters:
structureId - the structure ID

countByStructureId

public static int countByStructureId(long structureId)
Returns the number of d d m structure versions where structureId = ?.

Parameters:
structureId - the structure ID
Returns:
the number of matching d d m structure versions

findByS_V

public static DDMStructureVersion findByS_V(long structureId,
                                            String version)
                                     throws NoSuchStructureVersionException
Returns the d d m structure version where structureId = ? and version = ? or throws a NoSuchStructureVersionException if it could not be found.

Parameters:
structureId - the structure ID
version - the version
Returns:
the matching d d m structure version
Throws:
NoSuchStructureVersionException - if a matching d d m structure version could not be found

fetchByS_V

public static DDMStructureVersion fetchByS_V(long structureId,
                                             String version)
Returns the d d m structure version where structureId = ? and version = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
structureId - the structure ID
version - the version
Returns:
the matching d d m structure version, or null if a matching d d m structure version could not be found

fetchByS_V

public static DDMStructureVersion fetchByS_V(long structureId,
                                             String version,
                                             boolean retrieveFromCache)
Returns the d d m structure version where structureId = ? and version = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
structureId - the structure ID
version - the version
retrieveFromCache - whether to use the finder cache
Returns:
the matching d d m structure version, or null if a matching d d m structure version could not be found

removeByS_V

public static DDMStructureVersion removeByS_V(long structureId,
                                              String version)
                                       throws NoSuchStructureVersionException
Removes the d d m structure version where structureId = ? and version = ? from the database.

Parameters:
structureId - the structure ID
version - the version
Returns:
the d d m structure version that was removed
Throws:
NoSuchStructureVersionException

countByS_V

public static int countByS_V(long structureId,
                             String version)
Returns the number of d d m structure versions where structureId = ? and version = ?.

Parameters:
structureId - the structure ID
version - the version
Returns:
the number of matching d d m structure versions

cacheResult

public static void cacheResult(DDMStructureVersion ddmStructureVersion)
Caches the d d m structure version in the entity cache if it is enabled.

Parameters:
ddmStructureVersion - the d d m structure version

cacheResult

public static void cacheResult(List<DDMStructureVersion> ddmStructureVersions)
Caches the d d m structure versions in the entity cache if it is enabled.

Parameters:
ddmStructureVersions - the d d m structure versions

create

public static DDMStructureVersion create(long structureVersionId)
Creates a new d d m structure version with the primary key. Does not add the d d m structure version to the database.

Parameters:
structureVersionId - the primary key for the new d d m structure version
Returns:
the new d d m structure version

remove

public static DDMStructureVersion remove(long structureVersionId)
                                  throws NoSuchStructureVersionException
Removes the d d m structure version with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
structureVersionId - the primary key of the d d m structure version
Returns:
the d d m structure version that was removed
Throws:
NoSuchStructureVersionException - if a d d m structure version with the primary key could not be found

updateImpl

public static DDMStructureVersion updateImpl(DDMStructureVersion ddmStructureVersion)

findByPrimaryKey

public static DDMStructureVersion findByPrimaryKey(long structureVersionId)
                                            throws NoSuchStructureVersionException
Returns the d d m structure version with the primary key or throws a NoSuchStructureVersionException if it could not be found.

Parameters:
structureVersionId - the primary key of the d d m structure version
Returns:
the d d m structure version
Throws:
NoSuchStructureVersionException - if a d d m structure version with the primary key could not be found

fetchByPrimaryKey

public static DDMStructureVersion fetchByPrimaryKey(long structureVersionId)
Returns the d d m structure version with the primary key or returns null if it could not be found.

Parameters:
structureVersionId - the primary key of the d d m structure version
Returns:
the d d m structure version, or null if a d d m structure version with the primary key could not be found

fetchByPrimaryKeys

public static Map<Serializable,DDMStructureVersion> fetchByPrimaryKeys(Set<Serializable> primaryKeys)

findAll

public static List<DDMStructureVersion> findAll()
Returns all the d d m structure versions.

Returns:
the d d m structure versions

findAll

public static List<DDMStructureVersion> findAll(int start,
                                                int end)
Returns a range of all the d d m structure versions.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureVersionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of d d m structure versions
end - the upper bound of the range of d d m structure versions (not inclusive)
Returns:
the range of d d m structure versions

findAll

public static List<DDMStructureVersion> findAll(int start,
                                                int end,
                                                OrderByComparator<DDMStructureVersion> orderByComparator)
Returns an ordered range of all the d d m structure versions.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from com.liferay.portlet.dynamicdatamapping.model.impl.DDMStructureVersionModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of d d m structure versions
end - the upper bound of the range of d d m structure versions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of d d m structure versions

removeAll

public static void removeAll()
Removes all the d d m structure versions from the database.


countAll

public static int countAll()
Returns the number of d d m structure versions.

Returns:
the number of d d m structure versions

getPersistence

public static DDMStructureVersionPersistence getPersistence()

setPersistence

@Deprecated
public void setPersistence(DDMStructureVersionPersistence persistence)
Deprecated. As of 6.2.0


Liferay 7.0-ce-m3