org.entityfs.cap.entityattrs.impl.metadata
Interface ChildEntityAttributeManager<T extends EntityAttributes>

Type Parameters:
T - The concrete type of EntityAttributes managed by this object.
All Known Implementing Classes:
DatabaseChildEntityAttributeManager

public interface ChildEntityAttributeManager<T extends EntityAttributes>

The child entity attributes manager is used by a entity attributes-enabled directory to manage the entity attributes of its child entities. One instance of this class (created by a ChildEntityAttributeManagerFactory) is used for every directory.

Since:
1.0
Author:
Karl Gustafsson
See Also:
AttributeFileRepository
In_jar:
entityfs-entity_attributes

Method Summary
 void add(String name, T attr)
          Set a new attribute record for the entity.
 boolean containsKey(String name)
          Does this object contain attributes for the named entity.
 void delete(String name)
          Delete the attribute record for the supplied entity.
 T get(String name, EntityType et)
          Get the attributes for the entity.
 void update(String name, T attr)
          Update the attribute record for the entity.
 

Method Detail

add

void add(String name,
         T attr)
Set a new attribute record for the entity. The entity should not have had any attributes previously.

Parameters:
name - The name of the entity.
attr - The attributes.

containsKey

boolean containsKey(String name)
Does this object contain attributes for the named entity.

Parameters:
name - The name of the entity.
Returns:
true if there is an attribute record for the entity.

get

T get(String name,
      EntityType et)
Get the attributes for the entity. If no attribute record is stored for the entity, return default attributes.

Parameters:
name - The entity name,
et - The type of entity. This is used to create default attributes if no attribute record is saved for the entity.
Returns:
The attributes for the entity.

update

void update(String name,
            T attr)
Update the attribute record for the entity.

Parameters:
name - The name of the entity.
attr - The new attributes for the entity.

delete

void delete(String name)
Delete the attribute record for the supplied entity.

Parameters:
name - The name of the entity whose record should be deleted.