/** * Finds all attribute names except those provided as arguments. * @return list of all attributes except those provided as arguments. */ public Set<String> getAttributeNamesSkip(String ... names) { Set<String> attributes = new CaseInsensitiveSet(getAttributeNames()); for (String name : names) { attributes.remove(name); } return attributes; }
/** * Finds all attribute names except managed like <code>id</code>, * <code>created_at</code>, <code>updated_at</code> and <code>record_version</code>, depending on argument. * * @param managed if true, time managed attributes <code>created_at</code> and <code>updated_at</code> will not be included (they are managed automatically). * If false (not managed) <code>created_at</code> and <code>updated_at</code> will be included in output. * @return list of all attributes except <code>id</code>, <code>created_at</code>, <code>updated_at</code> and * <code>record_version</code>, depending on argument. */ public Set<String> getAttributeNamesSkipGenerated(boolean managed) { //TODO: can cache this, but will need a cache for managed=true an another for managed=false Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNamesSkipId()); if(managed){ attributesNames.remove("created_at"); attributesNames.remove("updated_at"); } attributesNames.remove(versionColumn); return attributesNames; }
/** * Finds all attribute names except for id. * * @return all attribute names except for id. */ public Set<String> getAttributeNamesSkipId() { if (attributeNamesNoId == null) {//no one cares about unfortunate multi-threading timing with 2 instances created //if someone does, use DCL with volatile Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNames()); attributesNames.remove(getIdName()); attributeNamesNoId = attributesNames; } return attributeNamesNoId; }
/** * Finds all attribute names except those provided as arguments. * @return list of all attributes except those provided as arguments. */ public Set<String> getAttributeNamesSkip(String ... names) { Set<String> attributes = new CaseInsensitiveSet(getAttributeNames()); for (String name : names) { attributes.remove(name); } return attributes; }
/** * Finds all attribute names except those provided as arguments. * * @return list of all attributes except those provided as arguments. */ public Set<String> getAttributeNamesSkip(String... names) { Set<String> attributes = new CaseInsensitiveSet(getAttributeNames()); for (String name : names) { attributes.remove(name); } return attributes; }
/** * Finds all attribute names except those provided as arguments. * @return list of all attributes except those provided as arguments. */ public Set<String> getAttributeNamesSkip(String ... names) { Set<String> attributes = new CaseInsensitiveSet(getAttributeNames()); for (String name : names) { attributes.remove(name); } return attributes; }
/** * Finds all attribute names except managed like <code>id</code>, * <code>created_at</code>, <code>updated_at</code> and <code>record_version</code>, depending on argument. * * @param managed if true, time managed attributes <code>created_at</code> and <code>updated_at</code> will not be included (they are managed automatically). * If false (not managed) <code>created_at</code> and <code>updated_at</code> will be included in output. * @return list of all attributes except <code>id</code>, <code>created_at</code>, <code>updated_at</code> and * <code>record_version</code>, depending on argument. */ public Set<String> getAttributeNamesSkipGenerated(boolean managed) { //TODO: can cache this, but will need a cache for managed=true an another for managed=false Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNamesSkipId()); if (managed) { attributesNames.remove("created_at"); attributesNames.remove("updated_at"); } attributesNames.remove(versionColumn); return attributesNames; }
/** * Finds all attribute names except managed like <code>id</code>, * <code>created_at</code>, <code>updated_at</code> and <code>record_version</code>, depending on argument. * * @param managed if true, time managed attributes <code>created_at</code> and <code>updated_at</code> will not be included (they are managed automatically). * If false (not managed) <code>created_at</code> and <code>updated_at</code> will be included in output. * @return list of all attributes except <code>id</code>, <code>created_at</code>, <code>updated_at</code> and * <code>record_version</code>, depending on argument. */ public Set<String> getAttributeNamesSkipGenerated(boolean managed) { //TODO: can cache this, but will need a cache for managed=true an another for managed=false Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNamesSkipId()); if(managed){ attributesNames.remove("created_at"); attributesNames.remove("updated_at"); } attributesNames.remove(versionColumn); return attributesNames; }
/** * Finds all attribute names except managed like <code>id</code>, * <code>created_at</code>, <code>updated_at</code> and <code>record_version</code>, depending on argument. * * @param managed if true, time managed attributes <code>created_at</code> and <code>updated_at</code> will not be included (they are managed automatically). * If false (not managed) <code>created_at</code> and <code>updated_at</code> will be included in output. * @return list of all attributes except <code>id</code>, <code>created_at</code>, <code>updated_at</code> and * <code>record_version</code>, depending on argument. */ public Set<String> getAttributeNamesSkipGenerated(boolean managed) { //TODO: can cache this, but will need a cache for managed=true an another for managed=false Set<String> attributes = new CaseInsensitiveSet(getAttributeNamesSkipId()); if(managed){ attributes.remove("created_at"); attributes.remove("updated_at"); } attributes.remove(versionColumn); return attributes; }
/** * Finds all attribute names except for id. * * @return all attribute names except for id. */ public Set<String> getAttributeNamesSkipId() { if (attributeNamesNoId == null) {//no one cares about unfortunate multi-threading timing with 2 instances created //if someone does, use DCL with volatile Set<String> attributes = new CaseInsensitiveSet(getAttributeNames()); attributes.remove(getIdName()); attributeNamesNoId = attributes; } return attributeNamesNoId; }
/** * Finds all attribute names except for id. * * @return all attribute names except for id. */ public Set<String> getAttributeNamesSkipId() { if (attributeNamesNoId == null) {//no one cares about unfortunate multi-threading timing with 2 instances created //if someone does, use DCL with volatile Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNames()); attributesNames.remove(getIdName()); attributeNamesNoId = attributesNames; } return attributeNamesNoId; }
/** * Finds all attribute names except for id. * * @return all attribute names except for id. */ public Set<String> getAttributeNamesSkipId() { if (attributeNamesNoId == null) {//no one cares about unfortunate multi-threading timing with 2 instances created //if someone does, use DCL with volatile Set<String> attributesNames = new CaseInsensitiveSet(getAttributeNames()); attributesNames.remove(getIdName()); attributeNamesNoId = attributesNames; } return attributeNamesNoId; }