SRJRCFrames
v0.1.296

de.schwarzrot.app.domain
Class DriveMapping

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by de.schwarzrot.data.support.AbstractEntity
          extended by de.schwarzrot.app.domain.DriveMapping
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, ChildEntity<AbstractSysConfig>, Entity, NamedChildEntity<String,AbstractSysConfig>, NamedEntity<String>, Serializable, Comparable<Entity>

public class DriveMapping
extends AbstractEntity
implements NamedChildEntity<String,AbstractSysConfig>

abstraction for mapping paths between windows and linux systems. Used to access serverside VDR-recordings and images from both systems.

Persistence always contains linux view of the world, cause background processing will not be available for windows systems in near future. So on windows clients, path-entries will be converted on read- and write-access. The client applications running on windows systems will always present windows paths to the user.

Author:
Reinhard Mantey
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface de.schwarzrot.data.ChildEntity
PARENT_ATTR_NAME
 
Constructor Summary
DriveMapping()
           
DriveMapping(String desktopValue, String hostValue)
           
 
Method Summary
 String getDesktopValue()
          return the windows view of the world
 String getHostValue()
          get linux view of the world
 String getName()
           
 AbstractSysConfig getParent()
          returns the parent entity instance of this entity instance
 Class<AbstractSysConfig> getParentType()
          returns the type of the parent entity
 Map<String,Integer> getSkipList()
          returns a map with property names, that EntityManagers should ignore.
 List<String> getUserAttributes()
          return a list of properties, that are user attributes.
 boolean isValid()
           
 void setDesktopValue(String desktopValue)
          change windows view of the world
 void setDirty(boolean dirty)
          marks an instance as dirty, which means the instance has changes, not written to persistence yet.
 void setHostValue(String hostValue)
          change linux view of the world
 void setName(String notUsed)
           
 void setParent(AbstractSysConfig parent)
          sets the parent entity instance to the given instance
 
Methods inherited from class de.schwarzrot.data.support.AbstractEntity
adoptChildren, adoptChildren, adoptGroupedChildren, compareTo, equals, getCModified, getCode, getDefaultOrder, getDtCreated, getDtModified, getId, getLogger, getMappings, getPersistenceName, getSchemaName, getSystemClass, getUCreated, getUModified, getUniqColumnNames, getVariantColumnName, getVariantTypeMap, hashCode, isDirty, isUserType, isVirtual, setCModified, setDtCreated, setDtModified, setId, setSchemaName, setUCreated, setUModified, toString, validate
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.schwarzrot.data.Entity
getCModified, getDefaultOrder, getDtCreated, getDtModified, getId, getMappings, getPersistenceName, getSchemaName, getSystemClass, getUCreated, getUModified, getUniqColumnNames, getVariantColumnName, getVariantTypeMap, isDirty, isUserType, isVirtual, setCModified, setDtCreated, setDtModified, setId, setUCreated, setUModified, validate
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.jgoodies.binding.beans.Observable
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

DriveMapping

public DriveMapping()

DriveMapping

public DriveMapping(String desktopValue,
                    String hostValue)
Method Detail

getDesktopValue

public final String getDesktopValue()
return the windows view of the world

Returns:
a windows path as String

getHostValue

public final String getHostValue()
get linux view of the world

Returns:
a linux path as String

getName

public final String getName()
Specified by:
getName in interface NamedEntity<String>

getParent

public final AbstractSysConfig getParent()
Description copied from interface: ChildEntity
returns the parent entity instance of this entity instance

Specified by:
getParent in interface ChildEntity<AbstractSysConfig>
Returns:
an entity

getParentType

public final Class<AbstractSysConfig> getParentType()
Description copied from interface: ChildEntity
returns the type of the parent entity

Specified by:
getParentType in interface ChildEntity<AbstractSysConfig>
Returns:
the parent entity

getSkipList

public Map<String,Integer> getSkipList()
Description copied from interface: Entity
returns a map with property names, that EntityManagers should ignore. These properties may be virtual properties, that not should be saved to persistence and/or methods that start with 'get' and that are not getters.

Implemention uses HashMaps for performance reasons, but the values are never used. So the map consists of propertynames as keys and an Integer as Value.

Every implementation should use the Map from parent class:

 public Map<String, Integer> getSkipList() {
     Map<String, Integer> skipList = super.getSkipList();
     skipList.put("a_virtual_field", 1);
     return skipList;
 }
 

Specified by:
getSkipList in interface Entity
Overrides:
getSkipList in class AbstractEntity
Returns:
a Map

getUserAttributes

public List<String> getUserAttributes()
Description copied from interface: Entity
return a list of properties, that are user attributes. Default is to return null to signal, that all properties are user attributes. In case this entity is a system entity, there may exists attributes, that may be overridded by users. So return a list of those attributes.

Specified by:
getUserAttributes in interface Entity
Overrides:
getUserAttributes in class AbstractEntity
Returns:
a list of property names

isValid

public boolean isValid()

setDesktopValue

public final void setDesktopValue(String desktopValue)
change windows view of the world

Parameters:
desktopValue - - the drive value for the desktop system

setDirty

public final void setDirty(boolean dirty)
Description copied from interface: Entity
marks an instance as dirty, which means the instance has changes, not written to persistence yet. Each setter should observe the changes and mark the instance as dirty as necessary.

Specified by:
setDirty in interface Entity
Overrides:
setDirty in class AbstractEntity
Parameters:
dirty - - true if instance has unsafed changes
See Also:
AbstractEntity

setHostValue

public final void setHostValue(String hostValue)
change linux view of the world

Parameters:
hostValue - - the drive value for the host system

setName

public final void setName(String notUsed)
Specified by:
setName in interface NamedEntity<String>

setParent

public final void setParent(AbstractSysConfig parent)
Description copied from interface: ChildEntity
sets the parent entity instance to the given instance

Specified by:
setParent in interface ChildEntity<AbstractSysConfig>
Parameters:
parent - the new parent entity instance

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.