Project

General

Profile

« Previous | Next » 

Revision 8e9785f0

Added by Andreas Müller over 7 years ago

Cleanup

View differences:

cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonDaoHibernateImplTest.java
93 93
    private UUID uuid;
94 94
    private UUID sphingidae;
95 95
    private UUID acherontia;
96
    private UUID mimas;
97 96
    private UUID rethera;
98 97
    private UUID retheraSecCdmtest;
99 98
    private UUID atroposAgassiz; // a Synonym
......
125 124
        atroposLeach =  UUID.fromString("3da4ab34-6c50-4586-801e-732615899b07");
126 125
        rethera = UUID.fromString("a9f42927-e507-4fda-9629-62073a908aae");
127 126
        retheraSecCdmtest = UUID.fromString("a9f42927-e507-4fda-9629-62073a908aae");
128
        mimas = UUID.fromString("900052b7-b69c-4e26-a8f0-01c215214c40");
129 127

  
130 128
        previousAuditEvent = new AuditEvent();
131 129
        previousAuditEvent.setRevisionNumber(1025);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/FindByIdentifierDTO.java
20 20
 *
21 21
 */
22 22
public class FindByIdentifierDTO<T extends IdentifiableEntity> {
23
	
23

  
24 24
	public class AlternativeIdentifier{
25 25
		UUID typeUuid;
26 26
		String typeLabel;
......
33 33
		public UUID getTypeUuid() {return typeUuid;}
34 34
		public String getTypeLabel() {return typeLabel;}
35 35
		public String getIdentifier() {return identifier;}
36
		
37
		
38 36
	}
39
	
37

  
40 38
	public class CdmEntity{
41 39
		UUID cdmUuid;
42
		String titleCache; 
40
		String titleCache;
43 41
		T entity;
44 42
		public CdmEntity(UUID cdmUuid, String titleCache, T entity) {
45 43
			this.cdmUuid = cdmUuid;
......
49 47
		public UUID getCdmUuid() {return cdmUuid;}
50 48
		public String getTitleCache() {return titleCache;}
51 49
		public T getEntity() {return entity;}
52
		
50

  
53 51
	}
54
	
52

  
55 53
	private AlternativeIdentifier identifier;
56
	
54

  
57 55
	private CdmEntity cdmEntity;
58
	
59
	
56

  
57

  
60 58
//	public class IdentifierMapping{
61 59
//		DefinedTerm identifierType;
62 60
//		String Identifier;
63 61
////		AlternativeIdentifier identifier;
64 62
//		UUID cdmUuid;
65 63
//		T entity;
66
//		
64
//
67 65
//		public IdentifierMapping(DefinedTerm identifierType, String identifier,
68 66
//						UUID cdmUuid, T entity) {
69 67
//			this.identifierType = identifierType;
......
72 70
//			this.entity = entity;
73 71
//		}
74 72
//	}
75
	
73

  
76 74
//	private List<IdentifierMapping> identifierMappings = new ArrayList<IdentifierMapping>();
77
	
75

  
78 76
	public FindByIdentifierDTO(DefinedTerm identifierType, String identifier, T entity){
79 77
		this.identifier = new AlternativeIdentifier(identifierType, identifier);
80 78
		this.cdmEntity = new CdmEntity(entity.getUuid(), entity.getTitleCache(), entity);
81 79
	}
82
	
80

  
83 81
	public FindByIdentifierDTO(DefinedTerm identifierType, String identifier, UUID entityUuid, String titleCache){
84 82
		this.identifier = new AlternativeIdentifier(identifierType, identifier);
85 83
		this.cdmEntity = new CdmEntity(entityUuid, null, null);
......
93 91
		return cdmEntity;
94 92
	}
95 93

  
96
	
94

  
97 95
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/pager/impl/DefaultPagerImpl.java
67 67
    protected String createLabel(String s1, String s2) {
68 68
        return s1 + DefaultPagerImpl.LABEL_DIVIDER + s2;
69 69
    }
70

  
71
    /**
72
     * {@inheritDoc}
73
     */
74
    @Override
75
    public String toString() {
76
        String result = "DefaultPagerImpl[";
77
        result += "count: " + count;
78
        result += "; pageSize: " + pageSize;
79
        result += "; pageNumbers: " + pageNumbers;
80
        result += "; pagesAvailable: " + pagesAvailable;
81
        result += "; firstRecord: " + firstRecord;
82
        result += "; lastRecord: " + lastRecord;
83
        result += "; suggestion: " + suggestion;
84
        result += "; pagesAvailable: " + pagesAvailable;
85
        result += "\nrecords: " + records;
86
        result += "]";
87
        return result;
88
    }
89

  
90

  
70 91
}

Also available in: Unified diff