下面列出了javax.persistence.Lob#org.codehaus.jackson.annotate.JsonIgnore 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@JsonIgnore
public Font getFont(){
if(this.font==null){
int fontStyle=Font.PLAIN;
if((bold!=null && bold) && (italic!=null && italic)){
fontStyle=Font.BOLD|Font.ITALIC;
}else if(bold!=null && bold){
fontStyle=Font.BOLD;
}else if(italic!=null && italic){
fontStyle=Font.ITALIC;
}
String fontName=fontFamily;
if(StringUtils.isBlank(fontName)){
fontName="宋体";
}
this.font=FontBuilder.getAwtFont(fontName, fontStyle, new Float(fontSize));
}
return this.font;
}
@JsonIgnore
@Override
public AtlasEntity getEntity(String guid) {
AtlasEntity ret = super.getEntity(guid);
if (ret == null && CollectionUtils.isNotEmpty(entities)) {
for (AtlasEntity entity : entities) {
if (StringUtils.equals(guid, entity.getGuid())) {
ret = entity;
break;
}
}
}
return ret;
}
@JsonIgnore
@Override
public PrimaryKey getPrimaryKey() {
Map<Schema.Field, Object> fieldToObjectMap = new HashMap<Schema.Field, Object>();
fieldToObjectMap.put(new Schema.Field("id", Schema.Type.LONG), this.id);
return new PrimaryKey(fieldToObjectMap);
}
@JsonIgnore
public String generateToken(){
SecureRandom randomGenerator = new SecureRandom();
Integer randomNumber = randomGenerator.nextInt(10000);
double currNanoTime = System.nanoTime();
double durationNanoTime = ((double)this.sessionTimeout)*(1000000000);
double expNanoTime = currNanoTime+durationNanoTime;
String key = this.username+":"+randomNumber.toString()+":"+expNanoTime;
byte[] dataBytes = key.getBytes(StandardCharsets.UTF_8);
authToken = username+"_0_"+Base64.getEncoder().encodeToString(dataBytes)+"_0_"+role;
System.out.println(authToken);
logger.info("Token for user "+this.username+" is "+this.authToken);
// authToken = username+"_0_"+key+"_0_"+role;
return authToken;
}
@JsonIgnore
public Set<String> getDimColNames() {
Set<String> toReturn = new HashSet<String>();
Set<String> dateTimeCols = this.dataTypeToColumnNames.get(DashboardConstants.DATETIME);
if(dateTimeCols!=null)
toReturn.addAll(dateTimeCols);
Set<String> stringCols = this.dataTypeToColumnNames.get(DashboardConstants.STRING);
if(stringCols!=null)
toReturn.addAll(stringCols);
return toReturn;
}
@JsonIgnore
public Set<String> getMetricColNames() {
Set<String> toReturn = new HashSet<String>();
Set<String> metricCols = this.dataTypeToColumnNames.get(DashboardConstants.NUMBER);
if(metricCols!=null)
toReturn.addAll(metricCols);
return toReturn;
}
@JsonIgnore
public boolean isUpdated() {
if (!isUpdated) {
for (StatePair statePair : pool.values()) {
// if one of the states have changed, then the pool is dirty
if (statePair.getState().isUpdated()) {
isUpdated = true;
return true;
}
}
}
return isUpdated;
}
@Override
@JsonIgnore
public boolean isConnected()
{
try {
return connection != null ? !connection.isClosed() : false;
} catch (SQLException e) {
throw new RuntimeException("is isConnected", e);
}
}
@JsonIgnore
public String getPathPrepared() {
if (null == path) {
return "";
} else {
return path.startsWith("/") ? path : ("/" + path);
}
}
@JsonIgnore
public boolean isEmpty() {
return CollectionUtils.isEmpty(enumDefs) &&
CollectionUtils.isEmpty(structDefs) &&
CollectionUtils.isEmpty(classificationDefs) &&
CollectionUtils.isEmpty(entityDefs) &&
CollectionUtils.isEmpty(relationshipDefs);
}
@JsonIgnore
public boolean isUpdated() {
if (!isUpdated) {
for (StatePair statePair : pool.values()) {
// if one of the states have changed, then the pool is dirty
if (statePair.getState().isUpdated()) {
isUpdated = true;
return true;
}
}
}
return isUpdated;
}
@JsonIgnore
public AtlasEntityHeader getFirstEntityCreated() {
final List<AtlasEntityHeader> entitiesByOperation = getEntitiesByOperation(EntityOperation.CREATE);
if ( entitiesByOperation != null && entitiesByOperation.size() > 0) {
return entitiesByOperation.get(0);
}
return null;
}
@JsonIgnore
public List<AtlasEntityHeader> getUpdatedEntities() {
if ( mutatedEntities != null) {
return mutatedEntities.get(EntityOperation.UPDATE);
}
return null;
}
@JsonIgnore
public List<AtlasEntityHeader> getDeletedEntities() {
if ( mutatedEntities != null) {
return mutatedEntities.get(EntityOperation.DELETE);
}
return null;
}
@JsonIgnore
@Override
public DatastreamTaskStatus getStatus() {
String statusStr = getState(STATUS);
if (statusStr != null && !statusStr.isEmpty()) {
return JsonUtils.fromJson(statusStr, DatastreamTaskStatus.class);
}
return null;
}
/**
*方法: 取得TablePropertyEntity
*@return: TablePropertyEntity 关联的表ID
*/
@ManyToOne
@JoinColumn(name ="table_id",nullable=false,referencedColumnName="id")
@JsonIgnore
@ForeignKey(name="null")
public CgFormHeadEntity getTable(){
return this.table;
}
@Override
@JsonIgnore
public Collection<String> getValueList() {
Collection<String> values = new HashSet<>();
for (EvidenceElement element : elementList) {
values.add(element.getValue());
}
return values;
}
/**
*
* @return @deprecated
*/
@Deprecated
@Override
@JsonIgnore
public String getFullCode() {
if (criterion == null) {
return "";
}
Reference reference = this.criterion.getReference();
Theme theme = this.criterion.getTheme();
return reference.getCode() + theme.getCode() + criterion.getCode()
+ this.getCode();
}
@JsonIgnore
public void addData(String groupKey, String key, Number value) {
Map<String, Map<String, Number>> data = this.data;
if (data == null) {
data = new HashMap<>();
}
Map<String, Number> metricMap = data.get(groupKey);
if (metricMap == null) {
metricMap = new HashMap<>();
data.put(groupKey, metricMap);
}
metricMap.put(key, value);
setData(data);
}
@JsonIgnore
public Number getMetric(String groupKey, String key) {
Map<String, Map<String, Number>> data = this.data;
if (data == null) {
return null;
} else {
Map<String, Number> metricMap = data.get(groupKey);
if (metricMap == null || metricMap.isEmpty()) {
return null;
} else {
return metricMap.get(key);
}
}
}
@JsonIgnore
public AtlasEntityHeader getFirstEntityPartialUpdated() {
final List<AtlasEntityHeader> entitiesByOperation = getEntitiesByOperation(EntityOperation.PARTIAL_UPDATE);
if ( entitiesByOperation != null && entitiesByOperation.size() > 0) {
return entitiesByOperation.get(0);
}
return null;
}
@JsonIgnore
public final void addReferredEntity(String guid, AtlasEntity entity) {
Map<String, AtlasEntity> r = this.referredEntities;
if (r == null) {
r = new HashMap<>();
this.referredEntities = r;
}
if (guid != null) {
r.put(guid, entity);
}
}
@JsonIgnore
@Override
public AtlasEntity getEntity(String guid) {
AtlasEntity ret = super.getEntity(guid);
if (ret == null && entity != null) {
if (StringUtils.equals(guid, entity.getGuid())) {
ret = entity;
}
}
return ret;
}
@JsonIgnore
@Override
public void compact() {
super.compact();
// remove 'entity' from referredEntities
if (entity != null) {
removeEntity(entity.getGuid());
}
}
@JsonIgnore
public List<AtlasEntityHeader> getCreatedEntities() {
if ( mutatedEntities != null) {
return mutatedEntities.get(EntityOperation.CREATE);
}
return null;
}
@JsonIgnore
public boolean isSuccess(){
return this.status == Const.ResponseCode.SUCCESS.getCode();
}
@JsonIgnore
public List<AtlasEntityHeader> getPartialUpdatedEntitiesByTypeName(String typeName) {
return getEntitiesByType(getEntitiesByOperation(EntityOperation.PARTIAL_UPDATE), typeName);
}
@JsonIgnore
public Backup getBackup()
{
return backup;
}
@JsonIgnore
public InputStream getAttachedContent() {
return attachedContent;
}
@JsonIgnore
public String getName() {
return header.getName();
}