Skip to content

Method: getId()

1: package de.fhdw.wtf.persistence.meta;
2:
3: /**
4: * A class to represent an abstract Model Item, which can be a Type or an UnidirectionalAssociation.
5: */
6: public abstract class ModelItem implements Matchable {
7:         
8:         /**
9:          * The id of the the Model Item in the Database.
10:          */
11:         private final long id;
12:         
13:         /**
14:          * The name of the Model Item.
15:          */
16:         private final String name;
17:         
18:         /**
19:          * Getter for Id.
20:          *
21:          * @return Provides the unique identifier of this model item.
22:          */
23:         public long getId() {
24:                 return this.id;
25:         }
26:         
27:         /**
28:          * Getter for name.
29:          *
30:          * @return Provides the name of this Model Item.
31:          */
32:         public String getName() {
33:                 return this.name;
34:         }
35:         
36:         /**
37:          * Constructor for a new ModelItem.
38:          *
39:          * @param id
40:          * the identifier in the database
41:          * @param name
42:          * the name of the Identifier
43:          */
44:         protected ModelItem(final long id, final String name) {
45:                 super();
46:                 this.id = id;
47:                 this.name = name;
48:         }
49:         
50: }