Class SModelId.ForeignSModelId

  • All Implemented Interfaces:
    SModelId
    Enclosing class:
    SModelId

    public static final class SModelId.ForeignSModelId
    extends SModelId
    Model identity based on plain string, with optional kind part up to first hash ('#') sign (i.e. "[kind#]identity"). Almost any string could be used for identity, provided it's unique within a repository. Although there's no known restrictions about string except uniqueness at the moment, it's advised not to stretch this freedom too much. Primary difference with SModelId.ModelNameSModelId is that identity is not treated as model name IMPORTANT: it's advised not to use this kind of model id and leave it for legacy code (e.g. VCS that reads model in old persistence format). This one has misguiding name (foreign to what?), mandates globally uniqueness while doesn't help to achieve one. Consider use of SModelId.IntegerSModelId if you need simple model id.
    • Method Detail

      • getId

        public String getId()
        Returns:
        never null
      • getKind

        public String getKind()
        Returns:
        optional part of the identity string, up to first '#', excluding; empty string if no kind part found
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getType

        public String getType()