Package org.pipservices3.commons.data
Interface IIdentifiable<K>
- All Known Subinterfaces:
IStringIdentifiable
public interface IIdentifiable<K>
Generic interface for data objects that can be uniquely identified by an id.
The type specified in the interface defines the type of id field.
### Example ###
public class MyData implements IIdentifiable<String> {
private String id;
public String field1;
public int field2;
...
public String getId() {...}
public void setId(String newId) {...}
}
-
Method Summary
-
Method Details
-
getId
K getId()Gets the object id- Returns:
- object id
-
setId
Sets the object id- Parameters:
value
- a new object id
-