APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class PropertyMapImpl

extends Object
implements PropertyMap
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.PropertyMap, java.lang.Iterable
Imports
io.github.spannm.jackcess.DataType, .PropertyMap, java.io.IOException, java.time.LocalDateTime, java.util.Date, .HashMap, .Iterator, .LinkedHashMap, .Map

Map of properties for a database object.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
PropertyMapImpl.PropDef

Helper for holding info about default properties

pack-priv static class
PropertyMapImpl.PropertyImpl

Info about a property defined in a PropertyMap.

Field Summary

Modifier and TypeField and Description
pack-priv static final byte
DDL_FLAG

property flag bit for the DDL argument of the DAO CreateProperty method.

private static final Map<String, PropertyMapImpl.PropDef>
private final String
private final short
private final PropertyMaps
private final Map<String, PropertyMap.Property>
pack-priv static final byte
SKIP_HANDLER_FLAG

property flag bit which tells the engine to store the value without running the handler bound to the property name, so that writing the property records a state instead of bringing it about.

Constructor Summary

AccessConstructor and Description
public
PropertyMapImpl(String name, short type, PropertyMaps owner)

Method Summary

Modifier and TypeMethod and Description
public static PropertyMap.Property
createProperty(String name, DataType type, Object value)

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

pack-priv static PropertyMap.Property

Returns:

the new property
createProperty
(String
property name
name
,
DataType
property type, or null to derive it from the default info or the value
type
,
Object
property value
value
,
byte
flag byte as stored in the file
flags
)

Creates a property with the given flag byte as stored in the file.

public PropertyMap.Property
get(String name)

Implements io.github.spannm.jackcess.PropertyMap.get.

Returns the property with the given name, if any.

public String
getName()

Implements io.github.spannm.jackcess.PropertyMap.getName.

Returns the name of the database object to which this property map belongs.

public PropertyMaps
public int
getSize()

Implements io.github.spannm.jackcess.PropertyMap.getSize.

Returns the number of properties currently in this map.

public short
public Object
getValue(String name)

Implements io.github.spannm.jackcess.PropertyMap.getValue.

Returns the value of the property with the given name, if any.

public Object
getValue(String name, Object defaultValue)

Implements io.github.spannm.jackcess.PropertyMap.getValue.

Returns the value of the property with the given name, if any, otherwise the given defaultValue.

public boolean
isEmpty()

Implements io.github.spannm.jackcess.PropertyMap.isEmpty.

Returns true if this map has no properties.

public Iterator<PropertyMap.Property>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public PropertyMapImpl.PropertyImpl
put(String name, Object value)

Implements io.github.spannm.jackcess.PropertyMap.put.

Creates a new (or updates an existing) property in the map.

public PropertyMapImpl.PropertyImpl
put(String name, DataType type, Object value)

Implements io.github.spannm.jackcess.PropertyMap.put.

Creates a new (or updates an existing) property in the map.

public PropertyMapImpl.PropertyImpl
public PropertyMapImpl.PropertyImpl
put(String name, DataType type, Object value, boolean isDdl)

Implements io.github.spannm.jackcess.PropertyMap.put.

Puts a property into this map with the given information.

pack-priv PropertyMapImpl.PropertyImpl

Returns:

the new property
put
(String
property name
name
,
DataType
property type
type
,
Object
property value
value
,
byte
flag byte as stored in the file
flags
)

Puts a property into this map with the given flag byte as stored in the file.

public void
putAll(Iterable<? extends PropertyMap.Property> newProps)

Implements io.github.spannm.jackcess.PropertyMap.putAll.

Puts all the given properties into this map.

public PropertyMapImpl.PropertyImpl
remove(String name)

Implements io.github.spannm.jackcess.PropertyMap.remove.

Removes the property with the given name

public void
save()

Implements io.github.spannm.jackcess.PropertyMap.save.

Saves the current state of this map.

private static byte

Returns:

the flag byte
toFlags
(boolean
whether the property is a DDL property
isDdl
)

Converts the given ddl state into a flag byte.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DDL_FLAGback to summary
pack-priv static final byte DDL_FLAG

property flag bit for the DDL argument of the DAO CreateProperty method. A user cannot change or delete a DDL property without dbSecWriteDef permission

DEFAULT_TYPESback to summary
private static final Map<String, PropertyMapImpl.PropDef> DEFAULT_TYPES
mapNameback to summary
private final String mapName
mapTypeback to summary
private final short mapType
ownerback to summary
private final PropertyMaps owner
propsback to summary
private final Map<String, PropertyMap.Property> props
SKIP_HANDLER_FLAGback to summary
pack-priv static final byte SKIP_HANDLER_FLAG

property flag bit which tells the engine to store the value without running the handler bound to the property name, so that writing the property records a state instead of bringing it about. The engine sets it on its own account and no DAO call produces it

Constructor Detail

PropertyMapImplback to summary
public PropertyMapImpl(String name, short type, PropertyMaps owner)

Method Detail

createPropertyback to summary
public static PropertyMap.Property createProperty(String name, DataType type, Object value)
createPropertyback to summary
public static PropertyMap.Property createProperty(String name, DataType type, Object value, boolean isDdl)
createPropertyback to summary
pack-priv static PropertyMap.Property createProperty(String name, DataType type, Object value, byte flags)

Creates a property with the given flag byte as stored in the file.

Parameters
name:String

property name

type:DataType

property type, or null to derive it from the default info or the value

value:Object

property value

flags:byte

flag byte as stored in the file

Returns:PropertyMap.Property

the new property

getback to summary
public PropertyMap.Property get(String name)

Implements io.github.spannm.jackcess.PropertyMap.get.

Doc from io.github.spannm.jackcess.PropertyMap.get.

Returns the property with the given name, if any.

Annotations
@Override
getNameback to summary
public String getName()

Implements io.github.spannm.jackcess.PropertyMap.getName.

Doc from io.github.spannm.jackcess.PropertyMap.getName.

Returns the name of the database object to which this property map belongs.

Annotations
@Override
getOwnerback to summary
public PropertyMaps getOwner()
getSizeback to summary
public int getSize()

Implements io.github.spannm.jackcess.PropertyMap.getSize.

Doc from io.github.spannm.jackcess.PropertyMap.getSize.

Returns the number of properties currently in this map.

Annotations
@Override
getTypeback to summary
public short getType()
getValueback to summary
public Object getValue(String name)

Implements io.github.spannm.jackcess.PropertyMap.getValue.

Doc from io.github.spannm.jackcess.PropertyMap.getValue.

Returns the value of the property with the given name, if any.

Annotations
@Override
getValueback to summary
public Object getValue(String name, Object defaultValue)

Implements io.github.spannm.jackcess.PropertyMap.getValue.

Doc from io.github.spannm.jackcess.PropertyMap.getValue.

Returns the value of the property with the given name, if any, otherwise the given defaultValue.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements io.github.spannm.jackcess.PropertyMap.isEmpty.

Doc from io.github.spannm.jackcess.PropertyMap.isEmpty.

Returns true if this map has no properties.

Annotations
@Override
iteratorback to summary
public Iterator<PropertyMap.Property> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
putback to summary
public PropertyMapImpl.PropertyImpl put(String name, Object value)

Implements io.github.spannm.jackcess.PropertyMap.put.

Doc from io.github.spannm.jackcess.PropertyMap.put.

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.

Annotations
@Override
putback to summary
public PropertyMapImpl.PropertyImpl put(String name, DataType type, Object value)

Implements io.github.spannm.jackcess.PropertyMap.put.

Doc from io.github.spannm.jackcess.PropertyMap.put.

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.

Annotations
@Override
putback to summary
public PropertyMapImpl.PropertyImpl put(PropertyMap.Property prop)
putback to summary
public PropertyMapImpl.PropertyImpl put(String name, DataType type, Object value, boolean isDdl)

Implements io.github.spannm.jackcess.PropertyMap.put.

Puts a property into this map with the given information.

Annotations
@Override
putback to summary
pack-priv PropertyMapImpl.PropertyImpl put(String name, DataType type, Object value, byte flags)

Puts a property into this map with the given flag byte as stored in the file.

Parameters
name:String

property name

type:DataType

property type

value:Object

property value

flags:byte

flag byte as stored in the file

Returns:PropertyMapImpl.PropertyImpl

the new property

putAllback to summary
public void putAll(Iterable<? extends PropertyMap.Property> newProps)

Implements io.github.spannm.jackcess.PropertyMap.putAll.

Doc from io.github.spannm.jackcess.PropertyMap.putAll.

Puts all the given properties into this map.

Annotations
@Override
removeback to summary
public PropertyMapImpl.PropertyImpl remove(String name)

Implements io.github.spannm.jackcess.PropertyMap.remove.

Doc from io.github.spannm.jackcess.PropertyMap.remove.

Removes the property with the given name

Annotations
@Override
saveback to summary
public void save() throws IOException

Implements io.github.spannm.jackcess.PropertyMap.save.

Doc from io.github.spannm.jackcess.PropertyMap.save.

Saves the current state of this map.

Annotations
@Override
toFlagsback to summary
private static byte toFlags(boolean isDdl)

Converts the given ddl state into a flag byte.

Parameters
isDdl:boolean

whether the property is a DDL property

Returns:byte

the flag byte

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
toStringback to summary
public static String toString(PropertyMap map)
io.github.spannm.jackcess.impl back to summary

private final Class PropertyMapImpl.PropDef

extends Object
Class Inheritance

Helper for holding info about default properties

Field Summary

Modifier and TypeField and Description
private final boolean
private final DataType

Constructor Summary

AccessConstructor and Description
private
PropDef(DataType type, boolean isDdl)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isDdlback to summary
private final boolean isDdl
typeback to summary
private final DataType type

Constructor Detail

PropDefback to summary
private PropDef(DataType type, boolean isDdl)
io.github.spannm.jackcess.impl back to summary

pack-priv final Class PropertyMapImpl.PropertyImpl

extends Object
implements Property
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.PropertyMap.Property

Info about a property defined in a PropertyMap.

Field Summary

Modifier and TypeField and Description
private final byte
flags

the flag byte exactly as it is stored in the file

private final String
private final DataType
private Object

Constructor Summary

AccessConstructor and Description
private
PropertyImpl(String name, DataType type, Object value, byte flags)

Method Summary

Modifier and TypeMethod and Description
pack-priv byte

Returns:

the flag byte
getFlags
()

Returns the flag byte as stored in the file.

public String
getName()

Implements io.github.spannm.jackcess.PropertyMap.Property.getName.

Returns the name of this property.

public DataType
getType()

Implements io.github.spannm.jackcess.PropertyMap.Property.getType.

Returns the data type of this property's value.

public Object
getValue()

Implements io.github.spannm.jackcess.PropertyMap.Property.getValue.

Returns the current value of this property.

public boolean
isDdl()

Implements io.github.spannm.jackcess.PropertyMap.Property.isDdl.

Whether or not this property is a DDL object.

public void
setValue(Object newValue)

Implements io.github.spannm.jackcess.PropertyMap.Property.setValue.

Sets the new value for this property.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

flagsback to summary
private final byte flags

the flag byte exactly as it is stored in the file

nameback to summary
private final String name
typeback to summary
private final DataType type
valueback to summary
private Object value

Constructor Detail

PropertyImplback to summary
private PropertyImpl(String name, DataType type, Object value, byte flags)

Method Detail

getFlagsback to summary
pack-priv byte getFlags()

Returns the flag byte as stored in the file. Access uses more of it than the one bit isDdl reports, so the whole byte has to be written back unchanged.

Returns:byte

the flag byte

getNameback to summary
public String getName()

Implements io.github.spannm.jackcess.PropertyMap.Property.getName.

Doc from io.github.spannm.jackcess.PropertyMap.Property.getName.

Returns the name of this property.

Annotations
@Override
getTypeback to summary
public DataType getType()

Implements io.github.spannm.jackcess.PropertyMap.Property.getType.

Doc from io.github.spannm.jackcess.PropertyMap.Property.getType.

Returns the data type of this property's value.

Annotations
@Override
getValueback to summary
public Object getValue()

Implements io.github.spannm.jackcess.PropertyMap.Property.getValue.

Doc from io.github.spannm.jackcess.PropertyMap.Property.getValue.

Returns the current value of this property.

Annotations
@Override
isDdlback to summary
public boolean isDdl()

Implements io.github.spannm.jackcess.PropertyMap.Property.isDdl.

Doc from io.github.spannm.jackcess.PropertyMap.Property.isDdl.

Whether or not this property is a DDL object. If true, users can't change or delete the property in access without the dbSecWriteDef permission. Additionally, certain properties must be flagged correctly or the access engine may not recognize them correctly.

Annotations
@Override
setValueback to summary
public void setValue(Object newValue)

Implements io.github.spannm.jackcess.PropertyMap.Property.setValue.

Doc from io.github.spannm.jackcess.PropertyMap.Property.setValue.

Sets the new value for this property.

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

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override