下面列出了怎么用javax.persistence.Transient的API类实例代码及写法,或者点击链接到github查看源代码。
@Transient
public List<OtherMessageItem> getHot(){
List<OtherMessageItem> otherMessageItemList = null ;
if(!StringUtils.isBlank(this.getHotmsg())) {
try {
otherMessageItemList = OnlineUserUtils.objectMapper.readValue(this.getHotmsg(), UKTools.getCollectionType(ArrayList.class, OtherMessageItem.class)) ;
} catch (Exception e) {
e.printStackTrace();
}
}
return otherMessageItemList ;
}
@Transient
public List<SessionConfigItem> getConfig(){
List<SessionConfigItem> sessionConfigItemList = null ;
if(!StringUtils.isBlank(this.getWorkinghours())) {
try {
sessionConfigItemList = OnlineUserUtils.objectMapper.readValue(this.getWorkinghours(), UKTools.getCollectionType(ArrayList.class, SessionConfigItem.class)) ;
} catch (Exception e) {
e.printStackTrace();
}
}
return sessionConfigItemList ;
}
@Transient
public ChartProperties getChartProperties() {
Base64 base64 = new Base64();
try {
return chartProperties!=null ? chartProperties : (chartProperties = (this.chartcontent==null?null:(ChartProperties)UKTools.toObject(base64.decode(this.chartcontent))));
} catch (Exception e) {
e.printStackTrace();
}
return chartProperties;
}
@Transient
public String getColor(){
String color = "color:#32c24d;" ;
if(!StringUtils.isBlank(this.theme) && this.theme.equals("01")){
color = "color:#32c24d " ;
}else if(!StringUtils.isBlank(this.theme) && this.theme.equals("02")){
color = "color:#32c24d " ;
}else if(!StringUtils.isBlank(this.theme) && this.theme.equals("03")){
color = "color:#1E90FF " ;
}
return color ;
}
@Transient
public String getStyleColor(){
String color = "#32c24d !important;" ;
if(!StringUtils.isBlank(this.theme) && this.theme.equals("01")){
color = "#32c24d !important;" ;
}else if(!StringUtils.isBlank(this.theme) && this.theme.equals("02")){
color = "#32c24d !important;" ;
}else if(!StringUtils.isBlank(this.theme) && this.theme.equals("03")){
color = "#1E90FF !important;" ;
}
return color ;
}
@Transient
public List<Choice> getAnswers() {
if (getChoices() != null) {
return getChoices().stream()
.filter(e -> e.getAnswer() == true)
.collect(Collectors.toList());
}
return null;
}
@Transient
public String getTitle(){
return this.groupid ;
}
@Transient
public void setOrderLine(List<InvoiceLine> orderLine) {
this.invoiceLine = orderLine;
}
@Transient
public String getStatus() {
return status;
}
@Transient
public String getSessionid() {
return sessionid;
}
@Transient
public String getTitle(){
return this.groupid ;
}
@Transient
public boolean isDisconnect() {
return this.disconnect;
}
@Transient
public String getTitle(){
return this.groupid ;
}
@Transient
public String getSessionid() {
return sessionid;
}
@Transient
public boolean isTip() {
return this.tip;
}
@Transient
public int getRowcount() {
return rowcount;
}
@Transient
public String getOrderid() {
return orderid;
}
@Transient
public List<Byte> getAuthorityIds() {
return IdEntity.getCollectionIds(getAuthorities());
}
/**
*
* @return
*/
@Transient
public String getCalltype() {
return calltype;
}
@Transient
public int getRowcount() {
return rowcount;
}
@Transient
public String getCurrentagent() {
return currentagent;
}
@Transient
public Topic getTopic() {
return topic;
}
@Transient
public User getUser() {
return user;
}
@Transient
public Integer getRank() {
return rank;
}
@Transient
public List<CubeMetadata> getMetadata() {
return metadata;
}
@Transient
public List<CubeMeasure> getMeasure() {
return measure;
}
@Transient
public AtomicInteger getDisnames() {
return disnames;
}
@Transient
public int getMaxusers() {
SessionConfig sessionConfig = ServiceQuene.initSessionConfig(this.orgi) ;
return sessionConfig!=null ? sessionConfig.getMaxuser() : UKDataContext.AGENT_STATUS_MAX_USER ;
}