Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.schema
Class Prefetch

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.Prefetch

public class Prefetch
extends Object

Information about what's to be prefetched: individual properties and whole schemas.


Field Summary
 Map<String,List<String>> keysBySchema
          map of schema -> list of prefix:name
 Map<String,Map<String,String>> keysBySchemaAndName
          map of schema -> name -> prefix:name
 Map<String,Serializable> values
          map of prefix:name -> value
 
Constructor Summary
Prefetch()
           
 
Method Summary
 void clearPrefetch(String schemaName)
          Clears the prefetches for a given schema.
 Serializable get(String xpath)
           
 Serializable get(String schemaName, String name)
           
 String getXPathSchema(String xpath, DocumentType type)
          Gets the schema name for a given xpath.
 boolean isEmpty()
           
 boolean isPrefetched(String xpath)
           
 boolean isPrefetched(String schemaName, String name)
           
 void put(String prefixedName, String schemaName, String name, Serializable value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

public Map<String,Serializable> values
map of prefix:name -> value

key can be a canonical xpath like prefix:name/0/othername

null values are stored as actual nulls


keysBySchema

public Map<String,List<String>> keysBySchema
map of schema -> list of prefix:name


keysBySchemaAndName

public Map<String,Map<String,String>> keysBySchemaAndName
map of schema -> name -> prefix:name

Constructor Detail

Prefetch

public Prefetch()
Method Detail

isEmpty

public boolean isEmpty()

put

public void put(String prefixedName,
                String schemaName,
                String name,
                Serializable value)

get

public Serializable get(String xpath)

get

public Serializable get(String schemaName,
                        String name)

isPrefetched

public boolean isPrefetched(String xpath)

isPrefetched

public boolean isPrefetched(String schemaName,
                            String name)

clearPrefetch

public void clearPrefetch(String schemaName)
Clears the prefetches for a given schema.


getXPathSchema

public String getXPathSchema(String xpath,
                             DocumentType type)
Gets the schema name for a given xpath.

The type is used to resolve non-prefixed properties.

Returns:
the schema name or null

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.