Package org.bedework.calfacade
Class BwProperty
java.lang.Object
- All Implemented Interfaces:
Serializable,Comparable<BwProperty>,org.bedework.util.logging.Logged
An arbitrary property value in bedework. This may be used to support, for
example, x-properties. This will probably be subclassed to provide further
support.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Constructor Summary
ConstructorsConstructorDescriptionConstructorBwProperty(String name, String value) Create a string by specifying all its fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck this is properly trimmedclone()Make visibleintcompareTo(BwProperty that) static BwPropertyfindName(String name, Collection<BwProperty> c) Search the collection for a string that matches the given name.getName()Get the namegetValue()Get the valueinthashCode()voidSet the namevoidSet the valuetoString()protected voidtoStringSegment(org.bedework.util.misc.ToString ts) Add our stuff to the ToString objectbooleanupdate(BwProperty from) Figure out what's different and update it.Methods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, afterDeletion, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, getSeq, length, setByteSize, setSeqMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
equals, getHref, getId, markUnsaved, setHref, setId, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Constructor Details
-
BwProperty
public BwProperty()Constructor -
BwProperty
Create a string by specifying all its fields- Parameters:
name- String property namevalue- String value
-
-
Method Details
-
setName
Set the name- Parameters:
val- String name
-
getName
Get the name- Returns:
- String name
-
setValue
Set the value- Parameters:
val- String value
-
getValue
Get the value- Returns:
- String value
-
findName
Search the collection for a string that matches the given name.We return the first one we found.
- Parameters:
name- of propertyc- collection of properties- Returns:
- BwProperty or null if no strings.
-
update
Figure out what's different and update it. This should reduce the number of spurious changes to the db.- Parameters:
from- BwProperty- Returns:
- true if we changed something.
-
checkNulls
public boolean checkNulls()Check this is properly trimmed- Returns:
- boolean true if changed
-
compareTo
- Specified by:
compareToin interfaceComparable<BwProperty>- Overrides:
compareToin classBwUnversionedDbentity<BwProperty>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwUnversionedDbentity<BwProperty>
-
toStringSegment
protected void toStringSegment(org.bedework.util.misc.ToString ts) Description copied from class:BwUnversionedDbentityAdd our stuff to the ToString object- Overrides:
toStringSegmentin classBwUnversionedDbentity<BwProperty>- Parameters:
ts- ToString for result
-
toString
-
clone
Description copied from class:BwUnversionedDbentityMake visible- Overrides:
clonein classBwUnversionedDbentity<BwProperty>- Returns:
- Object of class T
-