Class Equipment
- java.lang.Object
-
- com.github.fmjsjx.libcommon.bson.model.ObjectModel<Self>
-
- com.github.fmjsjx.libcommon.bson.model.DefaultMapValueModel<java.lang.String,Equipment>
-
- com.github.fmjsjx.libcommon.example.bson.model.Equipment
-
- All Implemented Interfaces:
com.github.fmjsjx.libcommon.bson.model.BsonModel
public class Equipment extends com.github.fmjsjx.libcommon.bson.model.DefaultMapValueModel<java.lang.String,Equipment>
-
-
Constructor Summary
Constructors Constructor Description Equipment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendFieldUpdates(java.util.List<org.bson.conversions.Bson> updates)booleanatkUpdated()booleandefUpdated()booleandeleted()protected intdeletedSize()intgetAtk()intgetDef()intgetHp()java.lang.StringgetId()intgetRefId()booleanhpUpdated()booleanidUpdated()voidload(com.fasterxml.jackson.databind.JsonNode src)voidload(com.jsoniter.any.Any src)voidload(org.bson.BsonDocument src)voidload(org.bson.Document src)booleanrefIdUpdated()voidreset()protected voidresetChildren()voidsetAtk(int atk)voidsetDef(int def)voidsetHp(int hp)voidsetId(java.lang.String id)voidsetRefId(int refId)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()-
Methods inherited from class com.github.fmjsjx.libcommon.bson.model.DefaultMapValueModel
bound, emitUpdated, key, key, parent, parent, unbind, xpath
-
-
-
-
Method Detail
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
getRefId
public int getRefId()
-
setRefId
public void setRefId(int refId)
-
getAtk
public int getAtk()
-
setAtk
public void setAtk(int atk)
-
getDef
public int getDef()
-
setDef
public void setDef(int def)
-
getHp
public int getHp()
-
setHp
public void setHp(int hp)
-
toBson
public org.bson.BsonDocument toBson()
- Specified by:
toBsonin interfacecom.github.fmjsjx.libcommon.bson.model.BsonModel- Specified by:
toBsonin classcom.github.fmjsjx.libcommon.bson.model.DefaultMapValueModel<java.lang.String,Equipment>
-
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<Equipment>
-
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)
-
idUpdated
public boolean idUpdated()
-
refIdUpdated
public boolean refIdUpdated()
-
atkUpdated
public boolean atkUpdated()
-
defUpdated
public boolean defUpdated()
-
hpUpdated
public boolean hpUpdated()
-
appendFieldUpdates
protected void appendFieldUpdates(java.util.List<org.bson.conversions.Bson> updates)
- Specified by:
appendFieldUpdatesin classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Equipment>
-
resetChildren
protected void resetChildren()
-
toSubUpdate
public java.lang.Object toSubUpdate()
- Specified by:
toSubUpdatein classcom.github.fmjsjx.libcommon.bson.model.ObjectModel<Equipment>
-
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
-
-