Skip to content

Instantly share code, notes, and snippets.

View imort's full-sized avatar

Iaroslav Kamnev imort

  • Lisbon
  • 23:17 (UTC +01:00)
View GitHub Profile
/**
* Default implementation of {@link #getRef()} method based on type and id.
* <p>
* This method create ref which looks like this: "type_name:id"
* This is most often used in API as ref, but there is no guaranty.
*/
@NonNull
static String createRef(@EntityType int entityType,
@Nullable String entityId) {
return EntityType.Utils.getApiName(entityType) + ":" + entityId;