Package org.bedework.calfacade
Class BwCategory
java.lang.Object
- All Implemented Interfaces:
Serializable,Comparable<BwCategory>,Comparator<BwCategory>,CollatableEntity,OwnedEntity,ShareableEntity,SizedEntity,org.bedework.util.logging.Logged
public class BwCategory
extends BwEventProperty<BwCategory>
implements CollatableEntity, Comparator<BwCategory>, SizedEntity
A category in Bedework. This value object does no consistency or validity
checking
.
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
Fields inherited from class org.bedework.calfacade.BwEventProperty
statusDeleted -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after delete from the dbclone()Make visibleintcompare(BwCategory o1, BwCategory o2) intcompareTo(BwCategory that) voidDelete the category's description - this must be called rather than setting the value to null.voidDelete the category's keyword - this must be called rather than setting the value to null.Get the value to collate withGet the category's descriptiongetName()Get the category's namestatic org.bedework.util.xml.FromXmlCallbackintgetSize()Size to use for quotas.getWord()Get the wordinthashCode()intlength()Size to use for quotas.static BwCategoryvoidsetDescription(BwString val) Set the category's descriptionvoidsetDescriptionVal(String val) voidSet the category's name (indexer)voidvoidSet the wordvoidsetWordVal(String val) voidtoJson(com.fasterxml.jackson.core.JsonGenerator jgen) toString()booleanupdateFrom(BwCategory cat) Methods inherited from class org.bedework.calfacade.BwEventProperty
copyTo, getColPath, getDeleted, getHref, getScore, getUid, initUid, setScore, setUid, toStringSegmentMethods inherited from class org.bedework.calfacade.base.BwShareableContainedDbentity
copyTo, setColPath, setColPath, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwShareableDbentity
copyTo, getAccess, getCreatorEnt, getCreatorHref, setAccess, setCreatorEnt, setCreatorHref, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwOwnedDbentity
copyTo, getOwnerHref, getPublick, setOwnerHref, setPublick, shallowCopyToMethods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, getSeq, setByteSize, setSeqMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
equals, 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 java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods 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, warnMethods inherited from interface org.bedework.calfacade.base.OwnedEntity
getOwnerHref, getPublick, setOwnerHref, setPublick
-
Constructor Details
-
BwCategory
public BwCategory()Constructor
-
-
Method Details
-
setWord
Set the word- Parameters:
val- BwString word
-
getWord
Get the word- Returns:
- BwString word
-
deleteWord
public void deleteWord()Delete the category's keyword - this must be called rather than setting the value to null. -
setDescription
Set the category's description- Parameters:
val- BwString category's description
-
getDescription
Get the category's description- Returns:
- BwString category's description
-
makeCategory
- Returns:
- category with uid filled in.
-
deleteDescription
public void deleteDescription()Delete the category's description - this must be called rather than setting the value to null. -
setName
Set the category's name (indexer)- Parameters:
val- String name
-
getName
Get the category's name- Returns:
- name
-
getFinderKeyValue
- Specified by:
getFinderKeyValuein classBwEventProperty<BwCategory>- Returns:
- Finder Key value from this object.
-
getCollateValue
Description copied from interface:CollatableEntityGet the value to collate with- Specified by:
getCollateValuein interfaceCollatableEntity- Returns:
- String collation value
-
afterDeletion
public void afterDeletion()Description copied from class:BwDbentityCalled after delete from the db- Overrides:
afterDeletionin classBwDbentity<BwCategory>
-
getSize
public int getSize()Size to use for quotas.- Specified by:
getSizein interfaceSizedEntity- Returns:
- int
-
setWordVal
- Parameters:
val- new category
-
getWordVal
- Returns:
- String
-
setDescriptionVal
- Parameters:
val- new description value
-
getDescriptionVal
- Returns:
- String
-
setStatus
-
getStatus
- Specified by:
getStatusin classBwEventProperty<BwCategory>- Returns:
- String
-
length
public int length()Size to use for quotas.- Overrides:
lengthin classBwDbentity<BwCategory>- Returns:
- int
-
updateFrom
- Parameters:
cat- the other one- Returns:
- true if anything changed
-
toJson
public void toJson(com.fasterxml.jackson.core.JsonGenerator jgen) -
getRestoreCallback
public static org.bedework.util.xml.FromXmlCallback getRestoreCallback() -
compare
- Specified by:
comparein interfaceComparator<BwCategory>
-
compareTo
- Specified by:
compareToin interfaceComparable<BwCategory>- Overrides:
compareToin classBwUnversionedDbentity<BwCategory>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwUnversionedDbentity<BwCategory>
-
toString
-
clone
Description copied from class:BwUnversionedDbentityMake visible- Overrides:
clonein classBwUnversionedDbentity<BwCategory>- Returns:
- Object of class T
-