org.compass.core.engine.utils
Class ResourceHelper

java.lang.Object
  extended by org.compass.core.engine.utils.ResourceHelper

public abstract class ResourceHelper
extends Object

Author:
kimchy

Method Summary
static Property[] toIds(Resource resource, CompassMapping mapping)
           
static Property[] toIds(Resource resource, ResourceMapping resourceMapping)
          Same as toIds(org.compass.core.Resource, org.compass.core.mapping.ResourceMapping, boolean) with idsMustExist set the true.
static Property[] toIds(Resource resource, ResourceMapping resourceMapping, boolean idsMustExist)
          Gets the id properties based on the resource mapping from the give resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toIds

public static Property[] toIds(Resource resource,
                               CompassMapping mapping)
                        throws SearchEngineException
Throws:
SearchEngineException

toIds

public static Property[] toIds(Resource resource,
                               ResourceMapping resourceMapping)
                        throws SearchEngineException
Same as toIds(org.compass.core.Resource, org.compass.core.mapping.ResourceMapping, boolean) with idsMustExist set the true.

Throws:
SearchEngineException

toIds

public static Property[] toIds(Resource resource,
                               ResourceMapping resourceMapping,
                               boolean idsMustExist)
                        throws SearchEngineException
Gets the id properties based on the resource mapping from the give resource. If must the flag idsMustExists is set, will throw an exception if id value not found, otherise will return null.

Throws:
SearchEngineException


Copyright (c) 2004-2009 The Compass Project.