public class XBRLDBAccessor
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| org.apache.log4j.Logger | logThe log. | 
| static java.util.Comparator<XBRLUnit> | unitDisambiguator | 
| Constructor and Description | 
|---|
| XBRLDBAccessor(org.hibernate.Session session,
              DbUtil.Database databaseType)Creates an instance of the XBRLDBAcessor object to query the database
 for the existence of objects. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | endArcrole(XBRLArcroleType role) | 
| void | endDocument(java.net.URI element) | 
| void | endRole(XBRLRoleType role) | 
| XBRLUsedOn | generate(XBRLUsedOn dtsOn,
        org.hibernate.Session session,
        XBRLRoleArcroleType role,
        java.util.List<java.lang.Object> createdObjects)Generate. | 
| DbUtil.Database | getDatabaseType()Gets the database type. | 
| java.util.Collection<QName> | qnameCollection(java.util.Collection<javax.xml.namespace.QName> inputCol,
               org.hibernate.Session typeSession,
               java.util.List<java.lang.Object> createdObjects) | 
| XBRLArcroleType | queryArcrole(XBRLArcroleType uri,
            org.hibernate.Session typeSession,
            java.util.List<java.lang.Object> createdObjects)Query arcrole. | 
| XBRLItem | queryConceptItem(java.lang.Long id)Query concept item. | 
| XBRLTuple | queryConceptTuple(java.lang.Long id)Query concept tuple. | 
| XBRLDocument | queryDocument(java.net.URI documentURI,
             org.hibernate.Session typeSession,
             java.util.List<java.lang.Object> createdObjects)Query document. | 
| XBRLInstance | queryDocument(XBRLInstance instance,
             org.hibernate.Session typeSession,
             java.util.List<java.lang.Object> createdObjects)Query the database for the existence of an XBRLInstance document. | 
| XBRLLinkbase | queryDocument(XBRLLinkbase linkbase,
             org.hibernate.Session typeSession,
             java.util.List<java.lang.Object> createdObjects)Query the database for the existence of an XBRLLinkbase document. | 
| XBRLTaxonomy | queryDocument(XBRLTaxonomy taxonomy,
             org.hibernate.Session typeSession,
             java.util.List<java.lang.Object> createdObjects)Query the database for the existence of an XBRLTaxonomy document. | 
| boolean | queryDocumentStored(java.net.URI uri,
                   org.hibernate.Session dbSession)This is a faster mechanism to check that a document has been stored to the
 database or not using the document URI. | 
| 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,
              org.hibernate.Session typeSession,
              java.util.List<java.lang.Object> createdObjects)Query namespace. | 
| QName | queryQName(javax.xml.namespace.QName q,
          org.hibernate.Session typeSession,
          java.util.List<java.lang.Object> createdObjects)Query q name. | 
| XBRLRoleType | queryRole(XBRLRoleType role,
         org.hibernate.Session typeSession,
         java.util.List<java.lang.Object> createdObjects)Query role. | 
| XBRLUnit | queryUnit(XBRLUnit unit,
         org.hibernate.Session typeSession,
         java.util.List<java.lang.Object> createdObjects) | 
public org.apache.log4j.Logger log
public static java.util.Comparator<XBRLUnit> unitDisambiguator
public XBRLDBAccessor(org.hibernate.Session session,
                      DbUtil.Database databaseType)
This constructor can be used only for querying documents. Not QNames and not for storing new data.
session - the sessiondatabaseType - the database typepublic XBRLInstance queryDocument(XBRLInstance instance, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
instance - XBRLInstance document in the RS object model.XBRLPojoGenerationExceptionpublic XBRLLinkbase queryDocument(XBRLLinkbase linkbase, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
linkbase - XBRLLinkbase document in the RS object model.XBRLPojoGenerationExceptionpublic XBRLTaxonomy queryDocument(XBRLTaxonomy taxonomy, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
taxonomy - XBRLTaxonomy document in the RS object model.XBRLPojoGenerationExceptionpublic XBRLDocument queryDocument(java.net.URI documentURI, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
documentURI - the URI of a documentXBRLPojoGenerationExceptionpublic void endDocument(java.net.URI element)
public XBRLItem queryConceptItem(java.lang.Long id)
id - the idpublic XBRLTuple queryConceptTuple(java.lang.Long id)
id - the idpublic QName queryQName(javax.xml.namespace.QName q, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
q - the qXBRLPojoGenerationExceptionpublic XBRLUnit queryUnit(XBRLUnit unit, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
unit - XBRLPojoGenerationExceptionorg.hibernate.HibernateExceptionpublic java.util.Collection<QName> qnameCollection(java.util.Collection<javax.xml.namespace.QName> inputCol, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
XBRLPojoGenerationExceptionpublic Namespace queryNamespace(javax.xml.namespace.QName q, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
q - the qXBRLPojoGenerationExceptionpublic XBRLRoleType queryRole(XBRLRoleType role, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
uri - the uriXBRLPojoGenerationExceptionpublic void endRole(XBRLRoleType role)
role - public XBRLUsedOn generate(XBRLUsedOn dtsOn, org.hibernate.Session session, XBRLRoleArcroleType role, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
dtsOn - the dts onXBRLPojoGenerationException - the XBRL pojo generation exceptionpublic XBRLArcroleType queryArcrole(XBRLArcroleType uri, org.hibernate.Session typeSession, java.util.List<java.lang.Object> createdObjects) throws XBRLPojoGenerationException
uri - the uriXBRLPojoGenerationExceptionpublic void endArcrole(XBRLArcroleType role)
role - public DbUtil.Database getDatabaseType()
public XBRLFactProperty queryFactProperty(XBRLFactItem fact, int container, XMLFragment property)
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).
fact - the factcontainer - the containerproperty - the propertypublic boolean queryDocumentStored(java.net.URI uri,
                                   org.hibernate.Session dbSession)
This is an optimization to avoid the cost of doing a queryDocument(...) != null that obtains all document content from the database when that content is not needed
uri - the document uri as stored in the databasedbSession - the session to use for the queryCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa