2.17.2: 2011-06-17

net.sf.basedb.core.data
Class DirectoryData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.OwnedData
          extended by net.sf.basedb.core.data.SharedData
              extended by net.sf.basedb.core.data.CommonData
                  extended by net.sf.basedb.core.data.DirectoryData
All Implemented Interfaces:
IdentifiableData, NameableData, OwnableData, RemovableData, ShareableData, SystemData

public class DirectoryData
extends CommonData
implements SystemData

This class holds information about directories.

Version:
2.0
Author:
enell
See Also:
Directory, File and directory overview
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $
Hibernate: class
table="`Directories`" lazy="true"

Field Summary
private  boolean autoCompress
           
private  boolean autoShare
           
private  Set<FileData> files
           
private  DirectoryData parent
           
private  Set<DirectoryData> subdirectories
           
private  String systemId
           
 
Fields inherited from interface net.sf.basedb.core.data.SystemData
MAX_SYSTEM_ID_LENGTH
 
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Constructor Summary
DirectoryData()
           
 
Method Summary
 boolean getAutoCompress()
          If files that are uploaded to this directory be compressed or not.
 boolean getAutoShare()
          If new files and subdirectories should inherit the share permission on this directory or not.
(package private)  Set<FileData> getFiles()
          This is the inverse end.
 String getName()
          Get the name of the item.
 DirectoryData getParent()
          Get the parent directory of this directory.
(package private)  Set<DirectoryData> getSubdirectories()
          This is the inverse end.
 String getSystemId()
          Get the system id for the item.
 void setAutoCompress(boolean autoCompress)
           
 void setAutoShare(boolean autoShare)
           
(package private)  void setFiles(Set<FileData> files)
           
 void setParent(DirectoryData parent)
           
(package private)  void setSubdirectories(Set<DirectoryData> subdirectories)
           
 void setSystemId(String systemId)
           
 
Methods inherited from class net.sf.basedb.core.data.CommonData
getDescription, isRemoved, setDescription, setName, setRemoved
 
Methods inherited from class net.sf.basedb.core.data.SharedData
getItemKey, getProjectKey, setItemKey, setProjectKey
 
Methods inherited from class net.sf.basedb.core.data.OwnedData
getOwner, setOwner
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
 
Methods inherited from interface net.sf.basedb.core.data.OwnableData
getOwner, setOwner
 

Field Detail

systemId

private String systemId

parent

private DirectoryData parent

autoCompress

private boolean autoCompress

autoShare

private boolean autoShare

files

private Set<FileData> files

subdirectories

private Set<DirectoryData> subdirectories
Constructor Detail

DirectoryData

public DirectoryData()
Method Detail

getName

public String getName()
Get the name of the item.

Specified by:
getName in interface NameableData
Overrides:
getName in class CommonData
Returns:
A String with the name of the item
Hibernate: property
type="string"
Hibernate: column
name="`name`" length="255" not-null="true" index="name_idx" unique-key="uniquedirectory"

getSystemId

public String getSystemId()
Description copied from interface: SystemData
Get the system id for the item.

Specified by:
getSystemId in interface SystemData
Returns:
The id of the item or null

setSystemId

public void setSystemId(String systemId)

getParent

public DirectoryData getParent()
Get the parent directory of this directory.

Hibernate: column
name="`parent_id`" unique-key="uniquedirectory" not-null="false"
Hibernate: many-to-one
outer-join="false"

setParent

public void setParent(DirectoryData parent)

getAutoCompress

public boolean getAutoCompress()
If files that are uploaded to this directory be compressed or not.

Since:
2.5
Hibernate: property
column="`auto_compress`" type="boolean" not-null="true"

setAutoCompress

public void setAutoCompress(boolean autoCompress)

getAutoShare

public boolean getAutoShare()
If new files and subdirectories should inherit the share permission on this directory or not.

Since:
2.8
Hibernate: property
column="`auto_share`" type="boolean" not-null="true"

setAutoShare

public void setAutoShare(boolean autoShare)

getFiles

Set<FileData> getFiles()
This is the inverse end.

See Also:
FileData.getDirectory()
Hibernate: set
lazy="true" inverse="true"
Hibernate: collection-key
column="`directory_id`"
Hibernate: collection-one-to-many
class="net.sf.basedb.core.data.FileData"

setFiles

void setFiles(Set<FileData> files)

getSubdirectories

Set<DirectoryData> getSubdirectories()
This is the inverse end.

See Also:
getParent()
Hibernate: set
lazy="true" inverse="true"
Hibernate: collection-key
column="`parent_id`"
Hibernate: collection-one-to-many
class="net.sf.basedb.core.data.DirectoryData"

setSubdirectories

void setSubdirectories(Set<DirectoryData> subdirectories)

2.17.2: 2011-06-17