public class RepoFileDAO extends DAO<RepoFile,RepoFileDAO>
| Constructor and Description |
|---|
RepoFileDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
deletePersistent(RepoFile entity) |
RepoFile |
getChildRepoFile(RepoFile parent,
String name)
Get the child of the given
parent with the specified name. |
Collection<RepoFile> |
getChildRepoFiles(RepoFile parent)
Get the children of the given
parent. |
Directory |
getLocalRootDirectory() |
RepoFile |
getRepoFile(File localRoot,
File file)
Get the
RepoFile for the given file in the file system. |
Collection<RepoFile> |
getRepoFilesChangedAfterExclLastSyncFromRepositoryId(long localRevision,
UUID exclLastSyncFromRepositoryId)
|
deletePersistentAll, getDAO, getEntityClass, getObjectByIdOrFail, getObjectByIdOrNull, getObjects, getObjectsCount, getPersistenceManager, load, makePersistent, persistenceManager, pm, setPersistenceManager, thisDAOpublic RepoFileDAO()
public RepoFile getChildRepoFile(RepoFile parent, String name)
parent with the specified name.public RepoFile getRepoFile(File localRoot, File file) throws IllegalArgumentException
RepoFile for the given file in the file system.localRoot - the repository's root directory in the file system. Must not be null.file - the file in the file system for which to query the associated RepoFile. Must not be null.RepoFile for the given file in the file system; null, if no such
object exists in the database.IllegalArgumentException - if one of the parameters is null or if the given file
is not located inside the repository - i.e. it is not a direct or indirect child of the given localRoot.public Directory getLocalRootDirectory()
public Collection<RepoFile> getChildRepoFiles(RepoFile parent)
parent.
The children are those RepoFiles whose parent equals the given
parent parameter.
parent - the parent whose children are to be queried. This may be null, but since
there is only one single instance with RepoFile.parent being null - the root directory - this
is usually never null.parent. Never null, but maybe empty.public Collection<RepoFile> getRepoFilesChangedAfterExclLastSyncFromRepositoryId(long localRevision, UUID exclLastSyncFromRepositoryId)
localRevision - the localRevision, after which the files
to be queried where modified.exclLastSyncFromRepositoryId - the lastSyncFromRepositoryId
to exclude from the result set. This is used to prevent changes originating from a repository to be synced back
to its origin (unnecessary and maybe causing a collision there).
See issue 25.RepoFiles which were modified after the given localRevision. Never
null, but maybe empty.public void deletePersistent(RepoFile entity)
deletePersistent in class DAO<RepoFile,RepoFileDAO>Copyright © 2013-2014. All Rights Reserved.