[exo-jcr-commits] exo-jcr SVN: r686 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core: nodetype and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Nov 16 10:30:08 EST 2009
Author: tolusha
Date: 2009-11-16 10:30:08 -0500 (Mon, 16 Nov 2009)
New Revision: 686
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java
Log:
EXOJCR-221: ItemAutocreator improvement: dont check exists child items for new added node
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java 2009-11-16 15:13:25 UTC (rev 685)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java 2009-11-16 15:30:08 UTC (rev 686)
@@ -123,7 +123,6 @@
this.session = session;
this.data = data;
- this.location = session.getLocationFactory().createJCRPath(data.getQPath());
this.dataManager = session.getTransientNodesManager();
this.locationFactory = session.getLocationFactory();
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2009-11-16 15:13:25 UTC (rev 685)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2009-11-16 15:30:08 UTC (rev 686)
@@ -585,7 +585,7 @@
dataManager.update(state, false);
NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
- ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager);
+ ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager, false);
PlainChangesLog changes =
itemAutocreator.makeAutoCreatedItems(nodeData(), type.getName(), dataManager, session.getUserID());
@@ -2604,7 +2604,7 @@
NodeImpl node = (NodeImpl)dataManager.update(state, true);
NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
- ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager);
+ ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager, true);
PlainChangesLog changes =
itemAutocreator.makeAutoCreatedItems(node.nodeData(), primaryTypeName, dataManager, session.getUserID());
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2009-11-16 15:13:25 UTC (rev 685)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemAutocreator.java 2009-11-16 15:30:08 UTC (rev 686)
@@ -69,16 +69,19 @@
private final ValueFactory valueFactory;
+ private final boolean avoidCheckExistedChildItems;
+
/**
* @param nodeTypeDataManager
*/
public ItemAutocreator(NodeTypeDataManager nodeTypeDataManager, ValueFactory valueFactory,
- ItemDataConsumer dataConsumer)
+ ItemDataConsumer dataConsumer, boolean avoidCheckExistedChildItems)
{
super();
this.nodeTypeDataManager = nodeTypeDataManager;
this.valueFactory = valueFactory;
this.dataConsumer = dataConsumer;
+ this.avoidCheckExistedChildItems = avoidCheckExistedChildItems;
}
public PlainChangesLog makeAutoCreatedItems(final NodeData parent, final InternalQName nodeTypeName,
@@ -113,7 +116,9 @@
{
if (ndef.isAutoCreated())
{
- final ItemData pdata = targetDataManager.getItemData(parent, new QPathEntry(ndef.getName(), 0));
+ final ItemData pdata =
+ avoidCheckExistedChildItems ? null : targetDataManager.getItemData(parent, new QPathEntry(
+ ndef.getName(), 0));
if (pdata == null && !addedNodes.contains(ndef.getName()) || pdata != null && !pdata.isNode())
{
@@ -156,7 +161,9 @@
if (pdef.isAutoCreated())
{
- final ItemData pdata = targetDataManager.getItemData(parent, new QPathEntry(pdef.getName(), 0));
+ final ItemData pdata =
+ avoidCheckExistedChildItems ? null : targetDataManager.getItemData(parent, new QPathEntry(
+ pdef.getName(), 0));
if (pdata == null && !addedProperties.contains(pdef.getName()) || pdata != null && pdata.isNode())
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java 2009-11-16 15:13:25 UTC (rev 685)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java 2009-11-16 15:30:08 UTC (rev 686)
@@ -638,7 +638,7 @@
final boolean recipientsMixVersionable = isNodeType(Constants.MIX_VERSIONABLE, recipienAllNodeTypeNames);
final boolean ancestorIsMixVersionable = isNodeType(Constants.MIX_VERSIONABLE, ancestorAllNodeTypeNames);
- ItemAutocreator itemAutocreator = new ItemAutocreator(this, valueFactory, dataManager);
+ ItemAutocreator itemAutocreator = new ItemAutocreator(this, valueFactory, dataManager, false);
if (recipientsMixVersionable && !ancestorIsMixVersionable)
{
@@ -838,7 +838,8 @@
volatileNodeTypeDataManager.registerVolatileNodeTypes(volatileNodeTypes);
- ItemAutocreator itemAutocreator = new ItemAutocreator(volatileNodeTypeDataManager, valueFactory, dataManager);
+ ItemAutocreator itemAutocreator =
+ new ItemAutocreator(volatileNodeTypeDataManager, valueFactory, dataManager, false);
final Set<String> nodes = this.indexSearcherHolder.getNodesByNodeType(recipientDefinition.getName());
// check add mix:versionable super
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java 2009-11-16 15:13:25 UTC (rev 685)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java 2009-11-16 15:30:08 UTC (rev 686)
@@ -16,7 +16,6 @@
*/
package org.exoplatform.services.jcr.impl.core.query;
-
import java.text.NumberFormat;
import javax.jcr.ItemExistsException;
@@ -56,298 +55,302 @@
/**
* Provides the default implementation for a JCR query.
*/
-public class QueryImpl extends AbstractQueryImpl {
+public class QueryImpl extends AbstractQueryImpl
+{
- /**
- * The logger instance for this class
- */
- private static final Logger log = LoggerFactory.getLogger(QueryImpl.class);
+ /**
+ * The logger instance for this class
+ */
+ private static final Logger log = LoggerFactory.getLogger(QueryImpl.class);
- /**
- * A string constant representing the JCR-SQL2 query language.
- *
- * @since JCR 2.0
- * TODO: REMOVE WHEN JSR 283 IS FINAL!!
- */
- public static final String JCR_SQL2 = "JCR-SQL2";
+ /**
+ * A string constant representing the JCR-SQL2 query language.
+ *
+ * @since JCR 2.0
+ * TODO: REMOVE WHEN JSR 283 IS FINAL!!
+ */
+ public static final String JCR_SQL2 = "JCR-SQL2";
- /**
- * A string constant representing the JCR-JQOM query language.
- *
- * @since JCR 2.0
- * TODO: REMOVE WHEN JSR 283 IS FINAL!!
- */
- public static final String JCR_JQOM = "JCR-JQOM";
+ /**
+ * A string constant representing the JCR-JQOM query language.
+ *
+ * @since JCR 2.0
+ * TODO: REMOVE WHEN JSR 283 IS FINAL!!
+ */
+ public static final String JCR_JQOM = "JCR-JQOM";
- /**
- * The session of the user executing this query
- */
- protected SessionImpl session;
+ /**
+ * The session of the user executing this query
+ */
+ protected SessionImpl session;
- /**
- * The query statement
- */
- protected String statement;
+ /**
+ * The query statement
+ */
+ protected String statement;
- /**
- * The syntax of the query statement
- */
- protected String language;
+ /**
+ * The syntax of the query statement
+ */
+ protected String language;
- /**
- * The actual query implementation that can be executed
- */
- protected ExecutableQuery query;
+ /**
+ * The actual query implementation that can be executed
+ */
+ protected ExecutableQuery query;
- /**
- * The node where this query is persisted. Only set when this is a persisted
- * query.
- */
- protected Node node;
+ /**
+ * The node where this query is persisted. Only set when this is a persisted
+ * query.
+ */
+ protected Node node;
- /**
- * The query handler for this query.
- */
- protected QueryHandler handler;
+ /**
+ * The query handler for this query.
+ */
+ protected QueryHandler handler;
- /**
- * Flag indicating whether this query is initialized.
- */
- private boolean initialized = false;
+ /**
+ * Flag indicating whether this query is initialized.
+ */
+ private boolean initialized = false;
- /**
- * The maximum result size
- */
- private long limit;
+ /**
+ * The maximum result size
+ */
+ private long limit;
- /**
- * The offset in the total result set
- */
- private long offset;
+ /**
+ * The offset in the total result set
+ */
+ private long offset;
- /**
- * @inheritDoc
- */
- public void init(SessionImpl session,
- SessionDataManager itemMgr,
- QueryHandler handler,
- String statement,
- String language) throws InvalidQueryException {
- checkNotInitialized();
- this.session = session;
- this.statement = statement;
- this.language = language;
- this.handler = handler;
- this.query = handler.createExecutableQuery(session, itemMgr, statement, language);
- setInitialized();
- }
+ /**
+ * @inheritDoc
+ */
+ public void init(SessionImpl session, SessionDataManager itemMgr, QueryHandler handler, String statement,
+ String language) throws InvalidQueryException
+ {
+ checkNotInitialized();
+ this.session = session;
+ this.statement = statement;
+ this.language = language;
+ this.handler = handler;
+ this.query = handler.createExecutableQuery(session, itemMgr, statement, language);
+ setInitialized();
+ }
- /**
- * @inheritDoc
- */
- public void init(SessionImpl session,
- SessionDataManager itemMgr,
- QueryHandler handler,
- Node node)
- throws InvalidQueryException, RepositoryException {
- checkNotInitialized();
- this.session = session;
- this.node = node;
- this.handler = handler;
+ /**
+ * @inheritDoc
+ */
+ public void init(SessionImpl session, SessionDataManager itemMgr, QueryHandler handler, Node node)
+ throws InvalidQueryException, RepositoryException
+ {
+ checkNotInitialized();
+ this.session = session;
+ this.node = node;
+ this.handler = handler;
- if (!((ExtendedNode)node).isNodeType(Constants.NT_QUERY)){
- throw new InvalidQueryException("node is not of type nt:query");
- }
- statement = node.getProperty("jcr:statement").getString();
- language = node.getProperty("jcr:language").getString();
- query = handler.createExecutableQuery(session, itemMgr, statement, language);
- setInitialized();
- }
+ if (!((ExtendedNode)node).isNodeType(Constants.NT_QUERY))
+ {
+ throw new InvalidQueryException("node is not of type nt:query");
+ }
+ statement = node.getProperty("jcr:statement").getString();
+ language = node.getProperty("jcr:language").getString();
+ query = handler.createExecutableQuery(session, itemMgr, statement, language);
+ setInitialized();
+ }
-// /**
-// * @inheritDoc
-// * <p/>
-// * Throws an {@link UnsupportedOperationException}.
-// */
-// public void init(SessionImpl session,
-// Sess itemMgr,
-// QueryHandler handler,
-// QueryObjectModelTree qomTree,
-// String language)
-// throws InvalidQueryException, RepositoryException {
-// throw new UnsupportedOperationException("not a prepared query");
-// }
+ // /**
+ // * @inheritDoc
+ // * <p/>
+ // * Throws an {@link UnsupportedOperationException}.
+ // */
+ // public void init(SessionImpl session,
+ // Sess itemMgr,
+ // QueryHandler handler,
+ // QueryObjectModelTree qomTree,
+ // String language)
+ // throws InvalidQueryException, RepositoryException {
+ // throw new UnsupportedOperationException("not a prepared query");
+ // }
- /**
- * This method simply forwards the <code>execute</code> call to the
- * {@link ExecutableQuery} object returned by
- * {@link QueryHandler#createExecutableQuery}.
- * {@inheritDoc}
- */
- public QueryResult execute() throws RepositoryException {
- checkInitialized();
- long time = System.currentTimeMillis();
- QueryResult result = query.execute(offset, limit);
- if (log.isDebugEnabled()) {
- time = System.currentTimeMillis() - time;
- NumberFormat format = NumberFormat.getNumberInstance();
- format.setMinimumFractionDigits(2);
- format.setMaximumFractionDigits(2);
- String seconds = format.format((double) time / 1000);
- log.debug("executed in " + seconds + " s. (" + statement + ")");
- }
- return result;
- }
+ /**
+ * This method simply forwards the <code>execute</code> call to the
+ * {@link ExecutableQuery} object returned by
+ * {@link QueryHandler#createExecutableQuery}.
+ * {@inheritDoc}
+ */
+ public QueryResult execute() throws RepositoryException
+ {
+ checkInitialized();
+ long time = System.currentTimeMillis();
+ QueryResult result = query.execute(offset, limit);
+ if (log.isDebugEnabled())
+ {
+ time = System.currentTimeMillis() - time;
+ NumberFormat format = NumberFormat.getNumberInstance();
+ format.setMinimumFractionDigits(2);
+ format.setMaximumFractionDigits(2);
+ String seconds = format.format((double)time / 1000);
+ log.debug("executed in " + seconds + " s. (" + statement + ")");
+ }
+ return result;
+ }
- /**
- * {@inheritDoc}
- */
- public String getStatement() {
- checkInitialized();
- return statement;
- }
+ /**
+ * {@inheritDoc}
+ */
+ public String getStatement()
+ {
+ checkInitialized();
+ return statement;
+ }
- /**
- * {@inheritDoc}
- */
- public String getLanguage() {
- checkInitialized();
- return language;
- }
+ /**
+ * {@inheritDoc}
+ */
+ public String getLanguage()
+ {
+ checkInitialized();
+ return language;
+ }
- /**
- * {@inheritDoc}
- */
- public String getStoredQueryPath()
- throws ItemNotFoundException, RepositoryException {
- checkInitialized();
- if (node == null) {
- throw new ItemNotFoundException("not a persistent query");
- }
- return node.getPath();
- }
+ /**
+ * {@inheritDoc}
+ */
+ public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException
+ {
+ checkInitialized();
+ if (node == null)
+ {
+ throw new ItemNotFoundException("not a persistent query");
+ }
+ return node.getPath();
+ }
- /**
- * {@inheritDoc}
- */
- public Node storeAsNode(String absPath)
- throws ItemExistsException,
- PathNotFoundException,
- VersionException,
- ConstraintViolationException,
- LockException,
- UnsupportedRepositoryOperationException,
- RepositoryException {
+ /**
+ * {@inheritDoc}
+ */
+ public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException,
+ ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException
+ {
- checkInitialized();
- JCRPath path = session.getLocationFactory().parseAbsPath(absPath);
- QPath qpath = path.getInternalPath();
- NodeImpl parent = (NodeImpl)session.getTransientNodesManager().getItem(qpath.makeParentPath(), false);
- if (parent == null)
- throw new PathNotFoundException("Parent not found for " + path.getAsString(false));
+ checkInitialized();
+ JCRPath path = session.getLocationFactory().parseAbsPath(absPath);
+ QPath qpath = path.getInternalPath();
+ NodeImpl parent = (NodeImpl)session.getTransientNodesManager().getItem(qpath.makeParentPath(), false);
+ if (parent == null)
+ throw new PathNotFoundException("Parent not found for " + path.getAsString(false));
- // validate as on parent child node
- parent.validateChildNode(qpath.getName(), Constants.NT_QUERY);
+ // validate as on parent child node
+ parent.validateChildNode(qpath.getName(), Constants.NT_QUERY);
- NodeData queryData =
- TransientNodeData.createNodeData((NodeData)parent.getData(), qpath.getName(), Constants.NT_QUERY);
- NodeImpl queryNode =
- (NodeImpl)session.getTransientNodesManager().update(ItemState.createAddedState(queryData), false);
+ NodeData queryData =
+ TransientNodeData.createNodeData((NodeData)parent.getData(), qpath.getName(), Constants.NT_QUERY);
+ NodeImpl queryNode =
+ (NodeImpl)session.getTransientNodesManager().update(ItemState.createAddedState(queryData), false);
- NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
+ NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
- ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, session.getValueFactory(),session.getTransientNodesManager());
+ ItemAutocreator itemAutocreator =
+ new ItemAutocreator(ntmanager, session.getValueFactory(), session.getTransientNodesManager(), false);
- PlainChangesLog changes =
- itemAutocreator.makeAutoCreatedItems((NodeData)queryNode.getData(), Constants.NT_QUERY, session
- .getTransientNodesManager(), session.getUserID());
+ PlainChangesLog changes =
+ itemAutocreator.makeAutoCreatedItems((NodeData)queryNode.getData(), Constants.NT_QUERY, session
+ .getTransientNodesManager(), session.getUserID());
- for (ItemState autoCreatedState : changes.getAllStates())
- {
- session.getTransientNodesManager().update(autoCreatedState, false);
- }
- // queryNode.addAutoCreatedItems(Constants.NT_QUERY);
- // set properties
- TransientValueData value = new TransientValueData(language);
- TransientPropertyData jcrLanguage =
- TransientPropertyData.createPropertyData(queryData, Constants.JCR_LANGUAGE, PropertyType.STRING, false, value);
- session.getTransientNodesManager().update(ItemState.createAddedState(jcrLanguage), false);
+ for (ItemState autoCreatedState : changes.getAllStates())
+ {
+ session.getTransientNodesManager().update(autoCreatedState, false);
+ }
+ // queryNode.addAutoCreatedItems(Constants.NT_QUERY);
+ // set properties
+ TransientValueData value = new TransientValueData(language);
+ TransientPropertyData jcrLanguage =
+ TransientPropertyData.createPropertyData(queryData, Constants.JCR_LANGUAGE, PropertyType.STRING, false, value);
+ session.getTransientNodesManager().update(ItemState.createAddedState(jcrLanguage), false);
- value = new TransientValueData(statement);
- TransientPropertyData jcrStatement =
- TransientPropertyData
- .createPropertyData(queryData, Constants.JCR_STATEMENT, PropertyType.STRING, false, value);
- session.getTransientNodesManager().update(ItemState.createAddedState(jcrStatement), false);
+ value = new TransientValueData(statement);
+ TransientPropertyData jcrStatement =
+ TransientPropertyData
+ .createPropertyData(queryData, Constants.JCR_STATEMENT, PropertyType.STRING, false, value);
+ session.getTransientNodesManager().update(ItemState.createAddedState(jcrStatement), false);
- // NOTE: for save stored node need save() on parent or on session (6.6.10
- // The Query Object)
- node = queryNode;
- return node;
- }
+ // NOTE: for save stored node need save() on parent or on session (6.6.10
+ // The Query Object)
+ node = queryNode;
+ return node;
+ }
- /**
- * Binds the given <code>value</code> to the variable named
- * <code>varName</code>.
- *
- * @param varName name of variable in query
- * @param value value to bind
- * @throws IllegalArgumentException if <code>varName</code> is not a
- * valid variable in this query.
- * @throws javax.jcr.RepositoryException if an error occurs.
- */
- public void bindValue(String varName, Value value)
- throws IllegalArgumentException, RepositoryException {
- checkInitialized();
- query.bindValue(session.getLocationFactory().parseJCRName(varName).getInternalName(), value);
- }
+ /**
+ * Binds the given <code>value</code> to the variable named
+ * <code>varName</code>.
+ *
+ * @param varName name of variable in query
+ * @param value value to bind
+ * @throws IllegalArgumentException if <code>varName</code> is not a
+ * valid variable in this query.
+ * @throws javax.jcr.RepositoryException if an error occurs.
+ */
+ public void bindValue(String varName, Value value) throws IllegalArgumentException, RepositoryException
+ {
+ checkInitialized();
+ query.bindValue(session.getLocationFactory().parseJCRName(varName).getInternalName(), value);
+ }
- /**
- * Sets the maximum size of the result set.
- *
- * @param limit new maximum size of the result set
- */
- public void setLimit(long limit) {
- this.limit = limit;
- }
+ /**
+ * Sets the maximum size of the result set.
+ *
+ * @param limit new maximum size of the result set
+ */
+ public void setLimit(long limit)
+ {
+ this.limit = limit;
+ }
- /**
- * Sets the start offset of the result set.
- *
- * @param offset new start offset of the result set
- */
- public void setOffset(long offset) {
- this.offset = offset;
- }
+ /**
+ * Sets the start offset of the result set.
+ *
+ * @param offset new start offset of the result set
+ */
+ public void setOffset(long offset)
+ {
+ this.offset = offset;
+ }
- //-----------------------------< internal >---------------------------------
+ //-----------------------------< internal >---------------------------------
- /**
- * Sets the initialized flag.
- */
- protected void setInitialized() {
- initialized = true;
- }
+ /**
+ * Sets the initialized flag.
+ */
+ protected void setInitialized()
+ {
+ initialized = true;
+ }
- /**
- * Checks if this query is not yet initialized and throws an
- * <code>IllegalStateException</code> if it is already initialized.
- */
- protected void checkNotInitialized() {
- if (initialized) {
- throw new IllegalStateException("already initialized");
- }
- }
+ /**
+ * Checks if this query is not yet initialized and throws an
+ * <code>IllegalStateException</code> if it is already initialized.
+ */
+ protected void checkNotInitialized()
+ {
+ if (initialized)
+ {
+ throw new IllegalStateException("already initialized");
+ }
+ }
- /**
- * Checks if this query is initialized and throws an
- * <code>IllegalStateException</code> if it is not yet initialized.
- */
- protected void checkInitialized() {
- if (!initialized) {
- throw new IllegalStateException("not initialized");
- }
- }
+ /**
+ * Checks if this query is initialized and throws an
+ * <code>IllegalStateException</code> if it is not yet initialized.
+ */
+ protected void checkInitialized()
+ {
+ if (!initialized)
+ {
+ throw new IllegalStateException("not initialized");
+ }
+ }
-
}
-
More information about the exo-jcr-commits
mailing list