Get entity's id from shortname.id,shortnameId,id

@param name
@param clazz
333635
protected final <T> T getId(String name, Class<T> clazz) {
    Object[] entityIds = getAll(name + ".id");
    if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id");
    if (Arrays.isEmpty(entityIds)) entityIds = getAll("id");
    if (Arrays.isEmpty(entityIds)) return null;
    else {
      String entityId = entityIds[0].toString();
      int commaIndex = entityId.indexOf(',');
      if (commaIndex != -1) entityId = entityId.substring(0, commaIndex);
      return Params.converter.convert(entityId, clazz);
    }
  }
867421
public String getShortName(Locale locale, String id, String nameKey, boolean standardTime) {
        String[] nameSet = getNameSet(locale, id, nameKey, standardTime);
        return nameSet == null ? null : nameSet[0];
    }
964592
public static Action getActionByName(Entity entity, String name) {
        if(entity == null) {
            throw new IllegalArgumentException("entity cannot be null.");
        }
        if(StringUtils.isBlank(name)) {
            throw new IllegalArgumentException("name cannot be null or empty.");
        }
        List<Action> actions = entity.getActions();
        if (actions == null)
            return null;
        Action action = null;
        for (Action a : actions) {
            if (a.getName().equals(name)) {
                action = a;
                break;
            }
        }
        return action;
    }
1283560
protected final <T> T populate(Class<T> clazz, String shortName) {
    return PopulateHelper.populate(clazz, shortName);
  }
238932
private Entity lookupEntity(String sid) {
        for (Integer i = 0; i < getEntities().size(); i++) {
            Entity e = getEntities().get(i);
            if (e != null && sid.compareTo(EntityContainer.buildId(e.getId())) == 0) {
                return getEntity(e.getId());
            }
        }
        return null;
    }
217003
@Override
    public Object getMember(String name) {
        switch (name) {
            case "appName":
                return F_appName;
            case "config":
                return F_config;
            case "master":
                return F_master;
            case "enableHiveSupport":
                return F_enableHiveSupport;
            case "getOrCreate":
                return F_getOrCreate;
        }
        return super.getMember(name);
    }
95776
public EntityType getEntityType(Class<?> clazz) {
    EntityType type = context.getEntityType(clazz);
    if (null == type) {
      type = new EntityType(clazz);
    }
    return type;
  }
406514
@Override
    public Object getProperty(String name)
    {
        // DTD-specific properties...
        if (name.equals(STAX_PROP_ENTITIES)) {
            safeEnsureFinishToken();
            if (mDTD == null || !(mDTD instanceof DTDSubset)) {
                return null;
            }
            List<EntityDecl> l = ((DTDSubset) mDTD).getGeneralEntityList();
            /* Let's make a copy, so that caller can not modify
             * DTD's internal list instance
             */
            return new ArrayList<EntityDecl>(l);
        }
        if (name.equals(STAX_PROP_NOTATIONS)) {
            safeEnsureFinishToken();
            if (mDTD == null || !(mDTD instanceof DTDSubset)) {
                return null;
            }
            /* Let's make a copy, so that caller can not modify
             * DTD's internal list instance
             */
            List<NotationDeclaration> l = ((DTDSubset) mDTD).getNotationList();
            return new ArrayList<NotationDeclaration>(l);
        }
        return super.getProperty(name);
    }
848900
@Override
    public Object getMember(String name) {
        switch (name) {
            case "description":
                return F_description;
            case "offsetDesc":
                return F_offsetDesc;
        }
        return super.getMember(name);
    }
678320
public <T> T get(Class<T> clazz, final String name)
	{
		JAXBNamedResourceFactory<T> cached = cachedReferences.get(name);

		if (cached == null)
		{
			cached = new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz);
			cachedReferences.put(name, cached);
		}

		return cached.get();
	}
43142
private AbstractRESTEntity asEntity(byte[] responseBody, Class<?> clazz)
        throws Exception {

        AbstractRESTEntity entity = null;

        entity = (AbstractRESTEntity) mapper.readValue(responseBody, clazz);

        return entity;
    }
214506
public void entityReference(String name) throws org.xml.sax.SAXException
  {
    append(m_doc.createEntityReference(name));
  }
524280
public <T> T getAuthenticationAttribute(final String name, final Class<T> clazz)
    {
        final Object attribute = getAuthenticationAttribute(name);
        return getAttributeByType(name, clazz, attribute);
    }
1243269
public void entityReference(String name) throws org.xml.sax.SAXException
    {

        flushPending();

        startEntity(name);
        endEntity(name);

        if (m_tracer != null)
		    fireEntityReference(name);
    }
633688
public Attribute getEntityAttribute(Class clazz, String fieldName)
    {
        if (entityTypes != null && entityTypes.containsKey(clazz))
        {
            EntityType entityType = entityTypes.get(clazz);
            return entityType.getAttribute(fieldName);
        }
        throw new IllegalArgumentException("No entity found: " + clazz);
    }
461592
public <T extends BaseNlpEntity> List<T> getEntities(Class<T> clazz) {
    List<BaseNlpEntity> resultList = new ArrayList<>();
    for (BaseNlpEntity item : getEntities()) {
      if (item.getClass().equals(clazz)) {
        resultList.add(item);
      }
    }
    return (List<T>) resultList;
  }
954360
public static Method getMethod(Class<?> clazz, String name) {
        return getMethod(clazz, name, false);
    }