Situation implements java.io.Externalizable { public static String createSubject(String... parts) { String ret=null; for (String part : parts) { if (ret == null) { ret = (part == null ? "" : part); } else { ret += SUBJECT_SEPARATOR_CHAR + (part == null ? "" : part); } } if (ret != null && ret.length() > 0) { int i=ret.length()-1; while (i >= 0 && ret.charAt(i) == SUBJECT_SEPARATOR_CHAR) { i--; } if (i != ret.length()-1) { ret = ret.substring(0, i+1); } } return (ret); }  @Id String getId(); void setId(String id); void setType(String type); @Column(name="situationType") String getType(); static String createSubject(String... parts); String[] subjectAsParts(); void setSubject(String subject); String getSubject(); void setDescription(String description); @Column(length=10240) @Lob String getDescription(); void setTimestamp(long timestamp); @Column(name="tstamp") long getTimestamp(); Severity getSeverity(); void setSeverity(Severity severity); void setActivityTypeIds(java.util.Set<ActivityTypeId> activityTypeIds); @ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="RTGOV_SITUATION_ACTIVITY_TYPES") java.util.Set<ActivityTypeId> getActivityTypeIds(); void setSituationProperties(java.util.Map<String,String> props); @ElementCollection(targetClass=String.class,fetch=FetchType.EAGER) @MapKeyColumn(name="name") @Column(name="value") @CollectionTable(name="RTGOV_SITUATION_PROPERTIES",joinColumns={ @JoinColumn(name="id",referencedColumnName="id")}) @JsonProperty("properties") java.util.Map<String,String> getSituationProperties(); @Deprecated void setProperties(java.util.Map<String,String> props); @Deprecated @Transient @JsonIgnore java.util.Map<String,String> getProperties(); void setContext(java.util.Set<Context> context); @ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="RTGOV_SITUATION_CONTEXT") java.util.Set<Context> getContext(); static Severity getHighestSeverity(java.util.List<Situation> sits); static java.util.List<Situation> getSituationsForSeverity(Severity severity,
                        java.util.List<Situation> sits); boolean equals(Object obj); int hashCode(); String toString(); void writeExternal(ObjectOutput out); @SuppressWarnings("unchecked") void readExternal(ObjectInput in); static final String RESUBMITTED_SITUATION_ID; static final char SUBJECT_SEPARATOR_CHAR; }
@Test public void testCreateSubject1() { if (Situation.createSubject() != null) { fail("Should be null subject"); } }