Package mops.persistence.directory
Class Directory
- java.lang.Object
-
- mops.persistence.directory.Directory
-
@AggregateRoot public class Directory extends java.lang.Object
Represents a directory where files can be stored.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<Directory>NAME_COMPARATORName Comparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DirectoryBuilderbuilder()Gives you DirectoryBuilder.protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.time.InstantgetCreationTime()Get the creation time.longgetGroupOwner()Id of the group which this Directory belongs to.java.lang.LonggetId()Database Id.java.time.InstantgetLastModifiedTime()Get the last modified time.@NonNull java.lang.StringgetName()Directory name.java.lang.LonggetParentId()Id of the Directory above this one.longgetPermissionsId()Id of the DirectoryPermissions object which stores the access permission for this Directory tree.inthashCode()booleanisRoot()Checks whether this directory is a root directory.voidsetGroupOwner(long groupOwner)Id of the group which this Directory belongs to.voidsetName(@NonNull java.lang.String name)Directory name.voidsetParentId(java.lang.Long parentId)Id of the Directory above this one.voidsetPermissionsId(long permissionsId)Id of the DirectoryPermissions object which stores the access permission for this Directory tree.java.lang.StringtoString()
-
-
-
Field Detail
-
NAME_COMPARATOR
public static final java.util.Comparator<Directory> NAME_COMPARATOR
Name Comparator.
-
-
Method Detail
-
getCreationTime
public java.time.Instant getCreationTime()
Get the creation time.- Returns:
- creation time
-
getLastModifiedTime
public java.time.Instant getLastModifiedTime()
Get the last modified time.- Returns:
- last modified time
-
isRoot
public boolean isRoot()
Checks whether this directory is a root directory.- Returns:
- true if this a root directory
-
builder
public static DirectoryBuilder builder()
Gives you DirectoryBuilder.- Returns:
- DirectoryBuilder
-
getId
public java.lang.Long getId()
Database Id.
-
getName
@NonNull public @NonNull java.lang.String getName()
Directory name.
-
getParentId
public java.lang.Long getParentId()
Id of the Directory above this one.
-
getGroupOwner
public long getGroupOwner()
Id of the group which this Directory belongs to.
-
getPermissionsId
public long getPermissionsId()
Id of the DirectoryPermissions object which stores the access permission for this Directory tree.
-
setName
public void setName(@NonNull @NonNull java.lang.String name)Directory name.
-
setParentId
public void setParentId(java.lang.Long parentId)
Id of the Directory above this one.
-
setGroupOwner
public void setGroupOwner(long groupOwner)
Id of the group which this Directory belongs to.
-
setPermissionsId
public void setPermissionsId(long permissionsId)
Id of the DirectoryPermissions object which stores the access permission for this Directory tree.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-