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_COMPARATOR
Name Comparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DirectoryBuilder
builder()
Gives you DirectoryBuilder.protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.time.Instant
getCreationTime()
Get the creation time.long
getGroupOwner()
Id of the group which this Directory belongs to.java.lang.Long
getId()
Database Id.java.time.Instant
getLastModifiedTime()
Get the last modified time.@NonNull java.lang.String
getName()
Directory name.java.lang.Long
getParentId()
Id of the Directory above this one.long
getPermissionsId()
Id of the DirectoryPermissions object which stores the access permission for this Directory tree.int
hashCode()
boolean
isRoot()
Checks whether this directory is a root directory.void
setGroupOwner(long groupOwner)
Id of the group which this Directory belongs to.void
setName(@NonNull java.lang.String name)
Directory name.void
setParentId(java.lang.Long parentId)
Id of the Directory above this one.void
setPermissionsId(long permissionsId)
Id of the DirectoryPermissions object which stores the access permission for this Directory tree.java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-