Class Player
- java.lang.Object
-
- com.github.fmjsjx.libcommon.bson.model.ObjectModel<Self>
-
- com.github.fmjsjx.libcommon.bson.model.RootModel<Player>
-
- com.github.fmjsjx.libcommon.example.bson.model.Player
-
- All Implemented Interfaces:
com.github.fmjsjx.libcommon.bson.model.BsonModel
public class Player extends com.github.fmjsjx.libcommon.bson.model.RootModel<Player>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBNAME_CASHstatic java.lang.StringBNAME_CREATE_TIMEstatic java.lang.StringBNAME_EQUIPMENTSstatic java.lang.StringBNAME_ITEMSstatic java.lang.StringBNAME_UIDstatic java.lang.StringBNAME_UPDATE_TIMEstatic java.lang.StringBNAME_UPDATE_VERSIONstatic java.lang.StringBNAME_WALLET
-
Constructor Summary
Constructors Constructor Description Player()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendFieldUpdates(java.util.List<org.bson.conversions.Bson> updates)booleancashUpdated()booleancreateTimeUpdated()booleandeleted()protected intdeletedSize()booleanequipmentsUpdated()CashInfogetCash()java.time.LocalDateTimegetCreateTime()com.github.fmjsjx.libcommon.bson.model.DefaultMapModel<java.lang.String,Equipment,Player>getEquipments()com.github.fmjsjx.libcommon.bson.model.SimpleMapModel<java.lang.Integer,java.lang.Integer,Player>getItems()intgetUid()java.time.LocalDateTimegetUpdateTime()intgetUpdateVersion()WalletgetWallet()intincreaseUpdateVersion()booleanitemsUpdated()voidload(com.fasterxml.jackson.databind.JsonNode src)voidload(com.jsoniter.any.Any src)voidload(org.bson.BsonDocument src)voidload(org.bson.Document src)voidreset()protected voidresetChildren()voidsetCreateTime(java.time.LocalDateTime createTime)voidsetUid(int uid)voidsetUpdateTime(java.time.LocalDateTime updateTime)voidsetUpdateVersion(int updateVersion)org.bson.BsonDocumenttoBson()java.util.Map<java.lang.String,?>toData()java.util.Map<java.lang.Object,java.lang.Object>toDelete()org.bson.DocumenttoDocument()java.lang.StringtoString()java.lang.ObjecttoSubUpdate()booleanuidUpdated()booleanupdated()booleanupdateTimeUpdated()booleanupdateVersionUpdated()booleanwalletUpdated()-
Methods inherited from class com.github.fmjsjx.libcommon.bson.model.RootModel
parent, toUpdates, xpath
-
-
-
-
Field Detail
-
BNAME_UID
public static final java.lang.String BNAME_UID
- See Also:
- Constant Field Values
-
BNAME_WALLET
public static final java.lang.String BNAME_WALLET
- See Also:
- Constant Field Values
-
BNAME_EQUIPMENTS
public static final java.lang.String BNAME_EQUIPMENTS
- See Also:
- Constant Field Values
-
BNAME_ITEMS
public static final java.lang.String BNAME_ITEMS
- See Also:
- Constant Field Values
-
BNAME_CASH
public static final java.lang.String BNAME_CASH
- See Also:
- Constant Field Values
-
BNAME_UPDATE_VERSION
public static final java.lang.String BNAME_UPDATE_VERSION
- See Also:
- Constant Field Values
-
BNAME_CREATE_TIME
public static final java.lang.String BNAME_CREATE_TIME
- See Also:
- Constant Field Values
-
BNAME_UPDATE_TIME
public static final java.lang.String BNAME_UPDATE_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUid
public int getUid()
-
setUid
public void setUid(int uid)
-
getWallet
public Wallet getWallet()
-
getEquipments
public com.github.fmjsjx.libcommon.bson.model.DefaultMapModel<java.lang.String,Equipment,Player> getEquipments()
-
getItems
public com.github.fmjsjx.libcommon.bson.model.SimpleMapModel<java.lang.Integer,java.lang.Integer,Player> getItems()
-
getCash
public CashInfo getCash()
-
getUpdateVersion
public int getUpdateVersion()
-
setUpdateVersion
public void setUpdateVersion(int updateVersion)
-
increaseUpdateVersion
public int increaseUpdateVersion()
-
getCreateTime
public java.time.LocalDateTime getCreateTime()
-
setCreateTime
public void setCreateTime(java.time.LocalDateTime createTime)
-
getUpdateTime
public java.time.LocalDateTime getUpdateTime()
-
setUpdateTime
public void setUpdateTime(java.time.LocalDateTime updateTime)
-
updated
public boolean updated()
- Specified by:
updatedin interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel- Overrides:
updatedin classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Player>
-
toBson
public org.bson.BsonDocument toBson()
-
toDocument
public org.bson.Document toDocument()
-
toData
public java.util.Map<java.lang.String,?> toData()
- Specified by:
toDatain interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel- Specified by:
toDatain classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Player>
-
load
public void load(org.bson.Document src)
-
load
public void load(org.bson.BsonDocument src)
-
load
public void load(com.jsoniter.any.Any src)
-
load
public void load(com.fasterxml.jackson.databind.JsonNode src)
-
uidUpdated
public boolean uidUpdated()
-
walletUpdated
public boolean walletUpdated()
-
equipmentsUpdated
public boolean equipmentsUpdated()
-
itemsUpdated
public boolean itemsUpdated()
-
cashUpdated
public boolean cashUpdated()
-
updateVersionUpdated
public boolean updateVersionUpdated()
-
createTimeUpdated
public boolean createTimeUpdated()
-
updateTimeUpdated
public boolean updateTimeUpdated()
-
appendFieldUpdates
protected void appendFieldUpdates(java.util.List<org.bson.conversions.Bson> updates)
- Specified by:
appendFieldUpdatesin classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Player>
-
resetChildren
protected void resetChildren()
-
toSubUpdate
public java.lang.Object toSubUpdate()
- Specified by:
toSubUpdatein classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Player>
-
toDelete
public java.util.Map<java.lang.Object,java.lang.Object> toDelete()
- Specified by:
toDeletein interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel
-
deletedSize
protected int deletedSize()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
reset
public void reset()
- Specified by:
resetin interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel
-
deleted
public boolean deleted()
- Specified by:
deletedin interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel
-
-