Class LocalEntity
java.lang.Object
org.eclipse.dirigible.repository.local.LocalEntity
- All Implemented Interfaces:
IEntity
- Direct Known Subclasses:
LocalCollection,LocalResource
public abstract class LocalEntity extends Object implements IEntity
The file system based implementation of
IEntity.-
Constructor Summary
Constructors Constructor Description LocalEntity(FileSystemRepository repository, RepositoryPath path)Instantiates a new local entity. -
Method Summary
Modifier and Type Method Description protected voidcreateAncestorsAndSelfIfMissing()Creates all ancestors of the givenIEntityand itself too if they don't already exist.protected voidcreateAncestorsIfMissing()Creates all ancestors of the givenIEntityinside the repository if they don't already exist.booleanequals(Object obj)Equals.IEntityInformationgetInformation()Gets the information.protected LocalObjectgetLocalObject()Returns theLocalObjectthat matches this entity's path.protected LocalObjectgetLocalObjectSafe()Returns theLocalObjectthat matches this entity's path.StringgetName()Gets the name.ICollectiongetParent()Gets the parent.StringgetPath()Gets the path.FileSystemRepositorygetRepository()Gets the repository.protected RepositoryPathgetRepositoryPath()Returns the path of thisIEntityrepresented by an instance ofRepositoryPath.inthashCode()Hash code.
-
Constructor Details
-
LocalEntity
Instantiates a new local entity.- Parameters:
repository- the repositorypath- the path
-
-
Method Details
-
getRepository
Gets the repository.- Specified by:
getRepositoryin interfaceIEntity- Returns:
- the repository
-
getRepositoryPath
Returns the path of thisIEntityrepresented by an instance ofRepositoryPath.- Returns:
- the repository path location
-
getName
Gets the name. -
getPath
Gets the path. -
getParent
Gets the parent. -
getInformation
Gets the information.- Specified by:
getInformationin interfaceIEntity- Returns:
- the information
- Throws:
RepositoryReadException- the repository read exception
-
getLocalObject
Returns theLocalObjectthat matches this entity's path. If there is no such object in the real repository, thennullis returned.- Returns:
- the local object
- Throws:
RepositoryReadException- the repository read exception
-
getLocalObjectSafe
Returns theLocalObjectthat matches this entity's path. If there is no such object in the real repository, then anRepositoryNotFoundExceptionis thrown.- Returns:
- the
LocalObjectthat matches this entity's path - Throws:
RepositoryNotFoundException- If there is no such object in the real repository
-
createAncestorsIfMissing
Creates all ancestors of the givenIEntityinside the repository if they don't already exist.- Throws:
RepositoryWriteException- the repository write exception
-
createAncestorsAndSelfIfMissing
Creates all ancestors of the givenIEntityand itself too if they don't already exist.- Throws:
RepositoryWriteException- the repository write exception
-
equals
Equals. -
hashCode
public int hashCode()Hash code.
-