com.healthmarketscience.jackcess
Interface PropertyMap

All Superinterfaces:
Iterable<PropertyMap.Property>
All Known Implementing Classes:
MultiValueColumnPropertyMap, PropertyMapImpl

public interface PropertyMap
extends Iterable<PropertyMap.Property>

Map of properties for a database object.

Author:
James Ahlborn
Usage:
General: This class is general use.

Nested Class Summary
static interface PropertyMap.Property
          Info about a property defined in a PropertyMap.
 
Field Summary
static String ACCESS_VERSION_PROP
           
static String ALLOW_MULTI_VALUE_PROP
           
static String ALLOW_ZERO_LEN_PROP
           
static String AUTHOR_PROP
           
static String CAPTION_PROP
           
static String COMPANY_PROP
           
static String DECIMAL_PLACES_PROP
           
static String DEFAULT_VALUE_PROP
           
static String DESCRIPTION_PROP
           
static String EXPRESSION_PROP
           
static String FORMAT_PROP
           
static String GUID_PROP
           
static String INPUT_MASK_PROP
           
static String REQUIRED_PROP
           
static String RESULT_TYPE_PROP
           
static String ROW_SOURCE_PROP
           
static String ROW_SOURCE_TYPE_PROP
           
static String TITLE_PROP
           
static String VALIDATION_RULE_PROP
           
static String VALIDATION_TEXT_PROP
           
 
Method Summary
 PropertyMap.Property get(String name)
           
 String getName()
           
 int getSize()
           
 Object getValue(String name)
           
 Object getValue(String name, Object defaultValue)
           
 boolean isEmpty()
           
 PropertyMap.Property put(String name, DataType type, Object value)
          Creates a new (or updates an existing) property in the map.
 PropertyMap.Property 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.
 PropertyMap.Property remove(String name)
          Removes the property with the given name
 void save()
          Saves the current state of this map.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

ACCESS_VERSION_PROP

static final String ACCESS_VERSION_PROP
See Also:
Constant Field Values

TITLE_PROP

static final String TITLE_PROP
See Also:
Constant Field Values

AUTHOR_PROP

static final String AUTHOR_PROP
See Also:
Constant Field Values

COMPANY_PROP

static final String COMPANY_PROP
See Also:
Constant Field Values

DEFAULT_VALUE_PROP

static final String DEFAULT_VALUE_PROP
See Also:
Constant Field Values

REQUIRED_PROP

static final String REQUIRED_PROP
See Also:
Constant Field Values

ALLOW_ZERO_LEN_PROP

static final String ALLOW_ZERO_LEN_PROP
See Also:
Constant Field Values

DECIMAL_PLACES_PROP

static final String DECIMAL_PLACES_PROP
See Also:
Constant Field Values

FORMAT_PROP

static final String FORMAT_PROP
See Also:
Constant Field Values

INPUT_MASK_PROP

static final String INPUT_MASK_PROP
See Also:
Constant Field Values

CAPTION_PROP

static final String CAPTION_PROP
See Also:
Constant Field Values

VALIDATION_RULE_PROP

static final String VALIDATION_RULE_PROP
See Also:
Constant Field Values

VALIDATION_TEXT_PROP

static final String VALIDATION_TEXT_PROP
See Also:
Constant Field Values

GUID_PROP

static final String GUID_PROP
See Also:
Constant Field Values

DESCRIPTION_PROP

static final String DESCRIPTION_PROP
See Also:
Constant Field Values

RESULT_TYPE_PROP

static final String RESULT_TYPE_PROP
See Also:
Constant Field Values

EXPRESSION_PROP

static final String EXPRESSION_PROP
See Also:
Constant Field Values

ALLOW_MULTI_VALUE_PROP

static final String ALLOW_MULTI_VALUE_PROP
See Also:
Constant Field Values

ROW_SOURCE_TYPE_PROP

static final String ROW_SOURCE_TYPE_PROP
See Also:
Constant Field Values

ROW_SOURCE_PROP

static final String ROW_SOURCE_PROP
See Also:
Constant Field Values
Method Detail

getName

String getName()

getSize

int getSize()

isEmpty

boolean isEmpty()

get

PropertyMap.Property get(String name)
Returns:
the property with the given name, if any

getValue

Object getValue(String name)
Returns:
the value of the property with the given name, if any

getValue

Object getValue(String name,
                Object defaultValue)
Returns:
the value of the property with the given name, if any, otherwise the given defaultValue

put

PropertyMap.Property put(String name,
                         Object value)
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 save() method has been called.

Returns:
the newly created (or updated) property
Throws:
IllegalArgumentException - if the type of the property could not be determined automatically

put

PropertyMap.Property put(String name,
                         DataType type,
                         Object value)
Creates a new (or updates an existing) property in the map.

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

Returns:
the newly created (or updated) property

putAll

void putAll(Iterable<? extends PropertyMap.Property> props)
Puts all the given properties into this map.

Parameters:
props - the properties to put into this map (null is tolerated and ignored).

remove

PropertyMap.Property remove(String name)
Removes the property with the given name

Returns:
the removed property, or null if none found

save

void save()
          throws IOException
Saves the current state of this map.

Throws:
IOException


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