com.ihr.xbrl.pojo
Class XBRLDBAccessor

java.lang.Object
  extended by com.ihr.xbrl.pojo.XBRLDBAccessor

public class XBRLDBAccessor
extends java.lang.Object

Methods to query the database for the existence of documents os other objects

Author:
Ignacio

Field Summary
 org.apache.log4j.Logger log
           
 
Constructor Summary
XBRLDBAccessor(org.hibernate.Session session, DbUtil.Database databaseType)
          Creates an instance of the XBRLDBAcessor object to query the database for the existence of objects.
XBRLDBAccessor(org.hibernate.Session session, DbUtil.Database databaseType, XBRLPojoGenerator xbrlPojoGenerator)
          Creates an instance of the XBRLDBAcessor object to query the database for the existence of objects.
 
Method Summary
 DbUtil.Database getDatabaseType()
           
 XBRLArcroleType queryArcrole(java.lang.String uri)
           
 XBRLItem queryConceptItem(java.lang.Long id)
           
 XBRLTuple queryConceptTuple(java.lang.Long id)
           
 XBRLDocument queryDocument(java.net.URI documentURI)
           
 XBRLInstance queryDocument(XBRLInstance instance)
          Query the database for the existence of an XBRLInstance document
 XBRLLinkbase queryDocument(XBRLLinkbase linkbase)
          Query the database for the existence of an XBRLLinkbase document
 XBRLTaxonomy queryDocument(XBRLTaxonomy taxonomy)
          Query the database for the existence of an XBRLTaxonomy document
 XBRLFactProperty queryFactProperty(XBRLFactItem fact, int container, XMLFragment property)
          Search on the database for a property in the XBRLFactProperty table that matches the selection criteria according with the primary key that is created using the fact ID, the container and the property node ID.
 Namespace queryNamespace(javax.xml.namespace.QName q)
           
 QName queryQName(javax.xml.namespace.QName q)
           
 XBRLRoleType queryRole(java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public org.apache.log4j.Logger log
Constructor Detail

XBRLDBAccessor

public XBRLDBAccessor(org.hibernate.Session session,
                      DbUtil.Database databaseType)
Creates an instance of the XBRLDBAcessor object to query the database for the existence of objects.

This constructor can be used only for querying documents. Not QNames and not for storing new data.

Parameters:
session -
databaseType -

XBRLDBAccessor

public XBRLDBAccessor(org.hibernate.Session session,
                      DbUtil.Database databaseType,
                      XBRLPojoGenerator xbrlPojoGenerator)
Creates an instance of the XBRLDBAcessor object to query the database for the existence of objects.

Parameters:
session -
databaseType -
xbrlPojoGenerator -
Method Detail

queryDocument

public XBRLInstance queryDocument(XBRLInstance instance)
Query the database for the existence of an XBRLInstance document

Parameters:
instance - XBRLInstance document in the RS object model.
Returns:
instance in the POJO object model from the database if found or null if not found

queryDocument

public XBRLLinkbase queryDocument(XBRLLinkbase linkbase)
Query the database for the existence of an XBRLLinkbase document

Parameters:
linkbase - XBRLLinkbase document in the RS object model.
Returns:
linkbase in the POJO object model from the database if found or null if not found

queryDocument

public XBRLTaxonomy queryDocument(XBRLTaxonomy taxonomy)
Query the database for the existence of an XBRLTaxonomy document

Parameters:
taxonomy - XBRLTaxonomy document in the RS object model.
Returns:
taxonomy in the POJO object model from the database if found or null if not found

queryDocument

public XBRLDocument queryDocument(java.net.URI documentURI)
Parameters:
documentURI - the URI of a document
Returns:
the XBRLDocument from the database

queryConceptItem

public XBRLItem queryConceptItem(java.lang.Long id)
Parameters:
id -

queryConceptTuple

public XBRLTuple queryConceptTuple(java.lang.Long id)
Parameters:
id -
Returns:

queryQName

public QName queryQName(javax.xml.namespace.QName q)
Returns:

queryNamespace

public Namespace queryNamespace(javax.xml.namespace.QName q)

queryRole

public XBRLRoleType queryRole(java.lang.String uri)

queryArcrole

public XBRLArcroleType queryArcrole(java.lang.String uri)

getDatabaseType

public DbUtil.Database getDatabaseType()
Returns:
the databaseType

queryFactProperty

public XBRLFactProperty queryFactProperty(XBRLFactItem fact,
                                          int container,
                                          XMLFragment property)
Search on the database for a property in the XBRLFactProperty table that matches the selection criteria according with the primary key that is created using the fact ID, the container and the property node ID.

One may think the container should not be part of the key, as the property is an XMLFragment that belongs to a specific container (segment or scenario), we have included the container as a specific property in order to allow virtual properties to be explicitly declared in the database. Virtual properties may be an XMLFragment node in its own and be at no container at all (default values for explicit dimensions are an example of this).

Parameters:
fact -
container -
property -
Returns:


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa