eu.scape_project.watch.dao
Class PropertyValueDAO

java.lang.Object
  extended by eu.scape_project.watch.dao.AbstractDO<PropertyValue>
      extended by eu.scape_project.watch.dao.PropertyValueDAO

public final class PropertyValueDAO
extends AbstractDO<PropertyValue>

PropertyValue Data Access Object.

Author:
Luis Faria

Method Summary
 int count(String bindings)
          Count the results of a query for PropertyValue.
 PropertyValue findByEntityAndName(String entityName, String propertyName)
          Find PropertyValue by the related Entity and Property.
static PropertyValueDAO getInstance()
          Get singleton instance.
 Collection<PropertyValue> listWithEntity(String entityName, int start, int max)
          List all property values of a specific Entity.
 Collection<PropertyValue> listWithEntityAndProperty(String entityName, String entityType, String propertyName, int start, int max)
          List all property values of a specific Entity and Property.
 Collection<PropertyValue> listWithProperty(String entityType, String propertyName, int start, int max)
          List all property values of a Property independently of the Entity.
 List<PropertyValue> query(String bindings, int start, int max)
          Query for PropertyValue.
 
Methods inherited from class eu.scape_project.watch.dao.AbstractDO
addDOListener, count, delete, delete, findById, fireOnRemoved, fireOnUpdated, query, removeDOListener, save, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PropertyValueDAO getInstance()
Get singleton instance.

Returns:
The singleton instance

findByEntityAndName

public PropertyValue findByEntityAndName(String entityName,
                                         String propertyName)
Find PropertyValue by the related Entity and Property.

Parameters:
entityName - The name of the related Entity
propertyName - The name of the related Property
Returns:
The PropertyValue or null if not found

query

public List<PropertyValue> query(String bindings,
                                 int start,
                                 int max)
Query for PropertyValue.

Parameters:
bindings - The query bindings, see AbstractDO.query(Class, String, int, int)
start - The index of the first item to retrieve
max - The maximum number of items to retrieve
Returns:
A list of PropertyValue filtered by the above constraints
See Also:
AbstractDO.query(Class, String, int, int)

count

public int count(String bindings)
Count the results of a query for PropertyValue.

Parameters:
bindings - The query bindings, see AbstractDO.count(Class, String)
Returns:
The number of results expected for the query

listWithEntity

public Collection<PropertyValue> listWithEntity(String entityName,
                                                int start,
                                                int max)
List all property values of a specific Entity.

Parameters:
entityName - The name of the Entity
start - The index of the first item to retrieve
max - The maximum number of items to retrieve
Returns:
The list of PropertyValue filtered by the above constraints

listWithEntityAndProperty

public Collection<PropertyValue> listWithEntityAndProperty(String entityName,
                                                           String entityType,
                                                           String propertyName,
                                                           int start,
                                                           int max)
List all property values of a specific Entity and Property.

Parameters:
entityName - The name of the Entity.
entityType - The name of the EntityType to which the Property belongs to
propertyName - The name of the Property.
start - The index of the first item to retrieve
max - The maximum number of items to retrieve
Returns:
The list of PropertyValue filtered by the above constraints

listWithProperty

public Collection<PropertyValue> listWithProperty(String entityType,
                                                  String propertyName,
                                                  int start,
                                                  int max)
List all property values of a Property independently of the Entity.

Parameters:
entityType - The name of the EntityType to which the Property belongs to
propertyName - The name of the Property.
start - The index of the first item to retrieve
max - The maximum number of items to retrieve
Returns:
The list of PropertyValue filtered by the above constraints


Copyright © 2012. All Rights Reserved.