eu.scape_project.watch.dao
Class PropertyDAO

java.lang.Object
  extended by eu.scape_project.watch.dao.AbstractDO<Property>
      extended by eu.scape_project.watch.dao.PropertyDAO

public final class PropertyDAO
extends AbstractDO<Property>

Author:
Luis Faria

Method Summary
 int count(String bindings)
          Count the results of a query for Property.
 Property findByEntityTypeAndName(String entityTypeName, String name)
          Find a Property by the related EntityType and name.
static PropertyDAO getInstance()
          Get singleton instance.
static String getPropertyRDFId(String entityType, String propertyName)
          Get the complete Property RDF Id to use in SPARQL.
 Collection<Property> listWithType(String type, int start, int max)
          List properties of a type.
 List<Property> query(String bindings, int start, int max)
          Query for Property.
 
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

getPropertyRDFId

public static String getPropertyRDFId(String entityType,
                                      String propertyName)
Get the complete Property RDF Id to use in SPARQL.

Parameters:
entityType - The name of the entity type that contains this property.
propertyName - The name of the property.
Returns:
The complete Property RDF Id using namescape prefix

getInstance

public static PropertyDAO getInstance()
Get singleton instance.

Returns:
The singleton instance

findByEntityTypeAndName

public Property findByEntityTypeAndName(String entityTypeName,
                                        String name)
Find a Property by the related EntityType and name.

Parameters:
entityTypeName - The name of the related EntityType
name - the name of the Property
Returns:
the Property or null if not found

query

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

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 Property 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 Property.

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

listWithType

public Collection<Property> listWithType(String type,
                                         int start,
                                         int max)
List properties of a type.

Parameters:
type - The related EntityType
start - the index of the first item to retrieve
max - the maximum number of items to retrieve
Returns:
The list of properties filtered by the above constraints


Copyright © 2012. All Rights Reserved.