more sensible toString()

This commit is contained in:
Gavin King 2022-10-28 01:15:50 +02:00
parent 5ea136781c
commit 16c39c0925
15 changed files with 18 additions and 14 deletions

View File

@ -409,7 +409,7 @@ public class PropertyBinder {
if ( candidate != null ) {
if ( valueGeneration != null ) {
throw new AnnotationException( "Property '" + qualify( holder.getPath(), name )
+ "' has multiple 'ValueGenerationType' annotations" );
+ "' has multiple '@ValueGenerationType' annotations" );
}
else {
valueGeneration = candidate;

View File

@ -720,7 +720,7 @@ public abstract class Collection implements Fetchable, Value, Filterable {
@Override
public String toString() {
return getClass().getName() + '(' + getRole() + ')';
return getClass().getSimpleName() + '(' + getRole() + ')';
}
public java.util.Set<String> getSynchronizedTables() {

View File

@ -427,7 +427,7 @@ public class Column implements Selectable, Serializable, Cloneable, ColumnTypeIn
@Override
public String toString() {
return getClass().getName() + '(' + getName() + ')';
return getClass().getSimpleName() + '(' + getName() + ')';
}
public String getCheckConstraint() {

View File

@ -406,7 +406,7 @@ public class Component extends SimpleValue implements MetaAttributable, Sortable
@Override
public String toString() {
return getClass().getName() + '(' + properties.toString() + ')';
return getClass().getSimpleName() + '(' + componentClassName + ')';
}
private IdentifierGenerator builtIdentifierGenerator;

View File

@ -220,7 +220,7 @@ public abstract class Constraint implements RelationalModel, Exportable, Seriali
String defaultSchema);
public String toString() {
return getClass().getName() + '(' + getTable().getName() + getColumns() + ") as " + name;
return getClass().getSimpleName() + '(' + getTable().getName() + getColumns() + ") as " + name;
}
/**

View File

@ -228,7 +228,7 @@ public class ForeignKey extends Constraint {
public String toString() {
if ( !isReferenceToPrimaryKey() ) {
return getClass().getName()
return getClass().getSimpleName()
+ '(' + getTable().getName() + getColumns()
+ " ref-columns:" + '(' + getReferencedColumns() + ") as " + getName() + ")";
}

View File

@ -92,6 +92,6 @@ public class Formula implements Selectable, Serializable {
@Override
public String toString() {
return this.getClass().getName() + "( " + formula + " )";
return this.getClass().getSimpleName() + "( " + formula + " )";
}
}

View File

@ -213,7 +213,7 @@ public class Index implements RelationalModel, Exportable, Serializable {
@Override
public String toString() {
return getClass().getName() + "(" + getName() + ")";
return getClass().getSimpleName() + "(" + getName() + ")";
}
@Override

View File

@ -184,7 +184,7 @@ public class Join implements AttributeContainer, Serializable {
}
public String toString() {
return getClass().getName() + '(' + table.toString() + ')';
return getClass().getSimpleName() + '(' + table.getName() + ')';
}
public boolean isLazy() {

View File

@ -216,4 +216,8 @@ public class OneToMany implements Value {
: null;
}
@Override
public String toString() {
return getClass().getSimpleName();
}
}

View File

@ -753,7 +753,7 @@ public abstract class PersistentClass implements AttributeContainer, Serializabl
@Override
public String toString() {
return getClass().getName() + '(' + getEntityName() + ')';
return getClass().getSimpleName() + '(' + getEntityName() + ')';
}
public List<Join> getJoins() {

View File

@ -274,7 +274,7 @@ public class Property implements Serializable, MetaAttributable {
}
public String toString() {
return getClass().getName() + '(' + name + ')';
return getClass().getSimpleName() + '(' + name + ')';
}
public void setLazy(boolean lazy) {

View File

@ -58,6 +58,6 @@ public class PropertyGeneration implements Serializable {
}
public String toString() {
return getClass().getName() + "(" + getName() + ")";
return getClass().getSimpleName() + "(" + getName() + ")";
}
}

View File

@ -925,7 +925,7 @@ public abstract class SimpleValue implements KeyValue {
@Override
public String toString() {
return getClass().getName() + '(' + columns + ')';
return getClass().getSimpleName() + '(' + columns + ')';
}
public Object accept(ValueVisitor visitor) {

View File

@ -762,7 +762,7 @@ public class Table implements RelationalModel, Serializable, ContributableDataba
}
public String toString() {
StringBuilder buf = new StringBuilder().append( getClass().getName() )
StringBuilder buf = new StringBuilder().append( getClass().getSimpleName() )
.append( '(' );
if ( getCatalog() != null ) {
buf.append( getCatalog() ).append( "." );