com.facetmap.sql
Class SqlResourceFactory
java.lang.Object
com.facetmap.sql.SqlResourceFactory
public class SqlResourceFactory
- extends java.lang.Object
The SqlResource equivalent of a ResourceSpace. In fact, this class is
instantiated as a facade on an existing ResourceSpace, translating
regular Resource objects into SqlResource objects whose Headings are in
a SqlFacetSpace, instead of in the ResourceSpace's underlying FacetSpace.
TODO provide a cache or two for the results of getById()
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceSpace
protected ResourceSpace resourceSpace
sqlFacetSpace
protected SqlFacetSpace sqlFacetSpace
SqlResourceFactory
public SqlResourceFactory(ResourceSpace resourceSpace,
SqlFacetSpace sqlFacetSpace)
getResourceCount
public int getResourceCount()
throws InternalException
- Throws:
InternalException
getById
public SqlResource getById(int id)
throws InternalException
- Throws:
InternalException
getAll
public java.util.Iterator getAll()
throws InternalException
- Throws:
InternalException
createSqlResource
public SqlResource createSqlResource(Resource resource)
getResourceSpace
public ResourceSpace getResourceSpace()
setResourceSpace
public void setResourceSpace(ResourceSpace resourceSpace)
getSqlFacetSpace
public SqlFacetSpace getSqlFacetSpace()
setSqlFacetSpace
public void setSqlFacetSpace(SqlFacetSpace sqlFacetSpace)