Package org.bedework.calfacade
Class BwLocation
java.lang.Object
- All Implemented Interfaces:
Serializable,Comparable<BwLocation>,Comparator<BwLocation>,CollatableEntity,OwnedEntity,ShareableEntity,SizedEntity,org.bedework.util.logging.Logged
public class BwLocation
extends BwEventProperty<BwLocation>
implements CollatableEntity, Comparator<BwLocation>, SizedEntity
The location of an
Event- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCurrently both address and subaddress have a unique constraint.Fields inherited from class org.bedework.calfacade.BwEventProperty
statusDeleted -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the named key with the value.voidCalled after delete from the dbclone()Make visibleintcompare(BwLocation thisone, BwLocation thatone) intcompareTo(BwLocation that) voidDelete the address - this must be called rather than setting the value to null.voidDelete the subaddress - this must be called rather than setting the value to null.voidDelete the named key from the key set (if it exists)booleanget the accessible part of the main address of the location.Get the main address of the locationGet the main address of the location for json output.get the alternateAddress part of the sub address of the location.org.bedework.util.vcard.CardgetCard()getCity()get the city part of the sub address of the location.getCode()get the code part of the sub address of the location.Get the value to collate withget the country part of the main address of the location.booleanget the do not use flag in the sub address of the location.get the geouri part of the main address of the location.getKeys()getLink()Get the link for the locationget the location type part of the main address of the location.static org.bedework.util.xml.FromXmlCallbackget the room part of the main address of the location.intgetSize()getState()get the state part of the sub address of the location.get the street part of the sub address of the location.Get the secondary address of the locationGet the secondary address of the location as a stringget the subfield 1 part of the main address of the location.get the subfield 2 part of the main address of the location.getZip()get the zip part of the sub address of the location.inthashCode()static BwLocationvoidsetAccessible(boolean val) Set the accessible part of the main address of the location.voidsetAddress(BwString val) voidsetAddressField(String val) Set the building part of the main address of the location.voidSet the alternateAddress part of the subaddress of the location.voidSet the city part of the subaddress of the location.voidSet the code part of the subaddress of the location.voidsetCountry(String val) Set the country part of the main address of the location.voidsetDoNotUse(boolean val) Set the do not use flag in the subaddress of the location.voidSet the geouri part of the main address of the location.voidsetKeys(List<BwLocation.KeyFld> vals) voidSet the Location's URLvoidsetLoctype(String val) Set the location type part of the main address of the location.voidsetRoomField(String val) Set the room part of the main address of the location.voidSet the state part of the subaddress of the location.voidvoidSet the street part of the subaddress of the location.voidsetSubaddress(BwString val) voidsetSubField1(String val) Set the subfield 1 part of the main address of the location.voidsetSubField2(String val) Set the subfield 2 part of the main address of the location.voidSet the zip part of the subaddress of the location.toString()booleanupdateFrom(BwLocation ent) voidUpdate the named key with the value.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, length, 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
-
Field Details
-
fieldDelimiter
Currently both address and subaddress have a unique constraint. To avoid schema changes we are packing subfields into the address field with a delimiter. The fields in order are: addressField room number subField1 subField2 accessible flag "T"- See Also:
-
-
Constructor Details
-
BwLocation
public BwLocation()Constructor
-
-
Method Details
-
setAddress
- Parameters:
val- the main address value
-
getAddress
Get the main address of the location- Returns:
- the main address of the location
-
setAddressField
Set the building part of the main address of the location. This is up to the room delimiter- Parameters:
val- the building part of the location
-
getAddressField
Get the main address of the location for json output. This is up to the room delimiter- Returns:
- the main address of the location
-
setRoomField
Set the room part of the main address of the location.- Parameters:
val- the room part of the location
-
getRoomField
get the room part of the main address of the location.- Returns:
- the room part of the location
-
setSubField1
Set the subfield 1 part of the main address of the location.- Parameters:
val- the subfield 1 part of the location
-
getSubField1
get the subfield 1 part of the main address of the location.- Returns:
- the subfield 1 part of the location
-
setSubField2
Set the subfield 2 part of the main address of the location.- Parameters:
val- the subfield 2 part of the location
-
getSubField2
get the subfield 2 part of the main address of the location.- Returns:
- the subfield 2 part of the location
-
setAccessible
public void setAccessible(boolean val) Set the accessible part of the main address of the location.- Parameters:
val- the accessible part of the location
-
getAccessible
public boolean getAccessible()get the accessible part of the main address of the location.- Returns:
- the accessible part of the location
-
setGeouri
Set the geouri part of the main address of the location.- Parameters:
val- the geouri part of the location
-
getGeouri
get the geouri part of the main address of the location.- Returns:
- the geouri part of the location
-
setLoctype
Set the location type part of the main address of the location.- Parameters:
val- the loctype for the location
-
getLoctype
get the location type part of the main address of the location.- Returns:
- the geouri part of the location
-
setCountry
Set the country part of the main address of the location.- Parameters:
val- the country for the location
-
getCountry
get the country part of the main address of the location.- Returns:
- the country part of the location
-
setStatus
-
getStatus
- Specified by:
getStatusin classBwEventProperty<BwLocation>- Returns:
- String
-
setKeys
-
getKeys
- Returns:
- KeyFld
-
addKey
Add the named key with the value.- Parameters:
name- of key - non nullval- of key - non null
-
updKey
Update the named key with the value. Will add if it is not present- Parameters:
name- of key - non nullval- of key - non null
-
delKey
Delete the named key from the key set (if it exists)- Parameters:
name- of key - non null
-
setSubaddress
- Parameters:
val- the sub-address
-
getSubaddress
Get the secondary address of the location- Returns:
- the secondary address of the location
-
getSubaddressField
Get the secondary address of the location as a string- Returns:
- the secondary address of the location
-
setStreet
Set the street part of the subaddress of the location.- Parameters:
val- the street part of the location
-
getStreet
get the street part of the sub address of the location.- Returns:
- the street part of the location
-
setCity
Set the city part of the subaddress of the location.- Parameters:
val- the city part of the location
-
getCity
get the city part of the sub address of the location.- Returns:
- the city part of the location
-
setState
Set the state part of the subaddress of the location.- Parameters:
val- the state part of the location
-
getState
get the state part of the sub address of the location.- Returns:
- the state part of the location
-
setZip
Set the zip part of the subaddress of the location.- Parameters:
val- the zip part of the location
-
getZip
get the zip part of the sub address of the location.- Returns:
- the zip part of the location
-
setAlternateAddress
Set the alternateAddress part of the subaddress of the location.- Parameters:
val- the alternateAddress part of the location
-
getAlternateAddress
get the alternateAddress part of the sub address of the location.- Returns:
- the alternateAddress part of the location
-
setCode
Set the code part of the subaddress of the location.- Parameters:
val- the code part of the location
-
getCode
get the code part of the sub address of the location.- Returns:
- the code part of the location
-
setDoNotUse
public void setDoNotUse(boolean val) Set the do not use flag in the subaddress of the location.- Parameters:
val- true for do not use
-
getDoNotUse
public boolean getDoNotUse()get the do not use flag in the sub address of the location.- Returns:
- true for do not use
-
setLink
Set the Location's URL- Parameters:
link- The new URL
-
getLink
Get the link for the location- Returns:
- the link for the location
-
makeLocation
- Returns:
- location with uid filled in.
-
deleteAddress
public void deleteAddress()Delete the address - this must be called rather than setting the value to null. -
deleteSubaddress
public void deleteSubaddress()Delete the subaddress - this must be called rather than setting the value to null. -
getFinderKeyValue
- Specified by:
getFinderKeyValuein classBwEventProperty<BwLocation>- 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<BwLocation>
-
getSize
public int getSize()- Specified by:
getSizein interfaceSizedEntity- Returns:
- integer current size of object.
-
updateFrom
-
getRestoreCallback
public static org.bedework.util.xml.FromXmlCallback getRestoreCallback() -
compare
- Specified by:
comparein interfaceComparator<BwLocation>
-
compareTo
- Specified by:
compareToin interfaceComparable<BwLocation>- Overrides:
compareToin classBwUnversionedDbentity<BwLocation>
-
hashCode
public int hashCode()- Overrides:
hashCodein classBwUnversionedDbentity<BwLocation>
-
toString
-
clone
Description copied from class:BwUnversionedDbentityMake visible- Overrides:
clonein classBwUnversionedDbentity<BwLocation>- Returns:
- Object of class T
-
getCombinedValues
- Returns:
- a string for use in the iCalendar LOCATION
-
getCard
public org.bedework.util.vcard.Card getCard()- Returns:
- a Card object representing the location.
-