com.healthmarketscience.jackcess.impl
Class PropertyMapImpl

java.lang.Object
  extended by com.healthmarketscience.jackcess.impl.PropertyMapImpl
All Implemented Interfaces:
PropertyMap, Iterable<PropertyMap.Property>

public class PropertyMapImpl
extends Object
implements PropertyMap

Map of properties for a database object.

Author:
James Ahlborn

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.PropertyMap
PropertyMap.Property
 
Field Summary
 
Fields inherited from interface com.healthmarketscience.jackcess.PropertyMap
ACCESS_VERSION_PROP, ALLOW_MULTI_VALUE_PROP, ALLOW_ZERO_LEN_PROP, AUTHOR_PROP, CAPTION_PROP, COMPANY_PROP, DECIMAL_PLACES_PROP, DEFAULT_VALUE_PROP, DESCRIPTION_PROP, EXPRESSION_PROP, FORMAT_PROP, GUID_PROP, INPUT_MASK_PROP, REQUIRED_PROP, RESULT_TYPE_PROP, ROW_SOURCE_PROP, ROW_SOURCE_TYPE_PROP, TITLE_PROP, VALIDATION_RULE_PROP, VALIDATION_TEXT_PROP
 
Constructor Summary
PropertyMapImpl(String name, short type, PropertyMaps owner)
           
 
Method Summary
static PropertyMap.Property createProperty(String name, DataType type, byte flag, Object value)
           
static PropertyMap.Property createProperty(String name, DataType type, Object value)
           
 PropertyMap.Property get(String name)
           
 String getName()
           
 PropertyMaps getOwner()
           
 int getSize()
           
 short getType()
           
 Object getValue(String name)
           
 Object getValue(String name, Object defaultValue)
           
 boolean isEmpty()
           
 Iterator<PropertyMap.Property> iterator()
           
 com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(PropertyMap.Property prop)
           
 com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name, DataType type, byte flag, Object value)
          Puts a property into this map with the given information.
 com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name, DataType type, Object value)
          Creates a new (or updates an existing) property in the map.
 com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name, Object value)
          Creates a new (or updates an existing) property in the map.
 void putAll(Iterable<? extends PropertyMap.Property> props)
          Puts all the given properties into this map.
 com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl remove(String name)
          Removes the property with the given name
 void save()
          Saves the current state of this map.
 String toString()
           
static String toString(PropertyMap map)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyMapImpl

public PropertyMapImpl(String name,
                       short type,
                       PropertyMaps owner)
Method Detail

getName

public String getName()
Specified by:
getName in interface PropertyMap

getType

public short getType()

getOwner

public PropertyMaps getOwner()

getSize

public int getSize()
Specified by:
getSize in interface PropertyMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface PropertyMap

get

public PropertyMap.Property get(String name)
Specified by:
get in interface PropertyMap
Returns:
the property with the given name, if any

getValue

public Object getValue(String name)
Specified by:
getValue in interface PropertyMap
Returns:
the value of the property with the given name, if any

getValue

public Object getValue(String name,
                       Object defaultValue)
Specified by:
getValue in interface PropertyMap
Returns:
the value of the property with the given name, if any, otherwise the given defaultValue

put

public com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name,
                                                                              Object value)
Description copied from interface: PropertyMap
Creates a new (or updates an existing) property in the map. Attempts to determine the type of the property based on the name and value (the property names listed above have their types builtin, otherwise the type of the value is used).

Note, this change will not be persisted until the PropertyMap.save() method has been called.

Specified by:
put in interface PropertyMap
Returns:
the newly created (or updated) property

put

public com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name,
                                                                              DataType type,
                                                                              Object value)
Description copied from interface: PropertyMap
Creates a new (or updates an existing) property in the map.

Note, this change will not be persisted until the PropertyMap.save() method has been called.

Specified by:
put in interface PropertyMap
Returns:
the newly created (or updated) property

putAll

public void putAll(Iterable<? extends PropertyMap.Property> props)
Description copied from interface: PropertyMap
Puts all the given properties into this map.

Specified by:
putAll in interface PropertyMap
Parameters:
props - the properties to put into this map (null is tolerated and ignored).

put

public com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(PropertyMap.Property prop)

put

public com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl put(String name,
                                                                              DataType type,
                                                                              byte flag,
                                                                              Object value)
Puts a property into this map with the given information.


remove

public com.healthmarketscience.jackcess.impl.PropertyMapImpl.PropertyImpl remove(String name)
Description copied from interface: PropertyMap
Removes the property with the given name

Specified by:
remove in interface PropertyMap
Returns:
the removed property, or null if none found

iterator

public Iterator<PropertyMap.Property> iterator()
Specified by:
iterator in interface Iterable<PropertyMap.Property>

save

public void save()
          throws IOException
Description copied from interface: PropertyMap
Saves the current state of this map.

Specified by:
save in interface PropertyMap
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

toString

public static String toString(PropertyMap map)

createProperty

public static PropertyMap.Property createProperty(String name,
                                                  DataType type,
                                                  Object value)

createProperty

public static PropertyMap.Property createProperty(String name,
                                                  DataType type,
                                                  byte flag,
                                                  Object value)


Copyright © 2005–2017 Health Market Science. All rights reserved.