Alters the attribute's table and removes the column representing the given {@link Attribute}.

@param attribute being added
@param <T>       parent type of the attribute
@throws TableModificationException if the removal fails.
502226
public <T> void dropColumn(Attribute<T, ?> attribute) {
        Type<T> type = attribute.getDeclaringType();
        if (attribute.isForeignKey()) {
            // TODO MySQL need to drop FK constraint first
        }
        QueryBuilder qb = createQueryBuilder();
        qb.keyword(ALTER, TABLE)
            .tableName(type.getName())
            .keyword(DROP, COLUMN)
            .attribute(attribute);
        try (Connection connection = getConnection()) {
            executeSql(connection, qb);
        } catch (SQLException e) {
            throw new TableModificationException(e);
        }
    }
842183
private void deletePolymorphicChildrenShallow(OneToManyPolymorphicAssociation association){
        String targetTable = metaModelOf(association.getTargetClass()).getTableName();
        String parentType = association.getTypeLabel();
        new DB(metaModelLocal.getDbName()).exec("DELETE FROM " + targetTable + " WHERE parent_id = ? AND parent_type = ?", getId(), parentType);
    }
645746
public function removeAttribute(string $attribute)
    {
        if (empty($attribute)) {
            Throw new ColumnException('An empty attribute is not allowed.');
        }

        unset($this->attributes[$attribute]);
    }
1083476
public void removeAttribute (int index)
    {
    int origMax = getLength () - 1;

    super.removeAttribute (index);
    if (index != origMax) {
        System.arraycopy (declared, index + 1, declared, index,
            origMax - index);
        System.arraycopy (specified, index + 1, specified, index,
            origMax - index);
    }
    }
991667
private void addAttributeInternal(EntityType entityType, Attribute attr) {
    if (!isPersisted(attr)) {
      return;
    }

    if (isMultipleReferenceType(attr)) {
      createJunctionTable(entityType, attr);

      if (attr.getDefaultValue() != null && !attr.isNillable()) {
        @SuppressWarnings("unchecked")
        Iterable<Entity> defaultRefEntities =
            (Iterable<Entity>) AttributeUtils.getDefaultTypedValue(attr);
        if (!Iterables.isEmpty(defaultRefEntities)) {
          createJunctionTableRows(entityType, attr, defaultRefEntities);
        }
      }
    } else {
      createColumn(entityType, attr);
    }
  }
218876
protected void setIntToRangeElement(String attribute, Integer val) {
        Element ele = $(rangeInputElement).asElement();
        if (ele != null) {
            ele.setPropertyInt(attribute, val);
        }
    }
1314105
@Override
    public void visit(final Attribute attribute) {
        if (type.isEmpty() || type.equals(attribute.getString())) {
            for (final GedObject gedObject : attribute.getAttributes()) {
                gedObject.accept(this);
                if (!dateString.isEmpty()) {
                    break;
                }
            }
        }
    }
472894
protected void fireAttributeChange(AttributeChangeEvent event) {
		if (this.listeners != null && isEventFirable()) {
			final AttributeChangeListener[] list = new AttributeChangeListener[this.listeners.size()];
			this.listeners.toArray(list);
			for (final AttributeChangeListener listener : list) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
1655
private static void removeDirective(
            String elementId, String attributeName, String type, IPerson person) {
        Document plf = (Document) person.getAttribute(Constants.PLF);
        Element node = plf.getElementById(elementId);
        if (node == null) return;

        Element editSet = null;

        try {
            editSet = getEditSet(node, plf, person, false);
        } catch (Exception e) {
            /*
             * we should never get here since we are calling getEditSet passing
             * create=false meaning that the only portion of that method that
             * tosses an exception will not be reached with this call. But if a
             * runtime exception somehow occurs we will log it so that we don't
             * lose the information.
             */
            LOG.error(e, e);
            return;
        }

        // if no edit set then the edit can't be there either
        if (editSet == null) return;

        Node child = editSet.getFirstChild();

        while (child != null) {
            if (child.getNodeName().equals(type)) {
                Attr attr = ((Element) child).getAttributeNode(Constants.ATT_NAME);
                if (attr != null && attr.getValue().equals(attributeName)) {
                    // we found it, remove it
                    editSet.removeChild(child);
                    break;
                }
            }
            child = child.getNextSibling();
        }
        // if that was the last on in the edit set then delete it
        if (editSet.getFirstChild() == null) node.removeChild(editSet);
    }
876054
public void setTablesToDelete(java.util.Collection<String> tablesToDelete) {
        if (tablesToDelete == null) {
            this.tablesToDelete = null;
            return;
        }

        this.tablesToDelete = new java.util.ArrayList<String>(tablesToDelete);
    }
242064
public Bindings removeBindings(String attribute) {
        if (_relations == null || attribute == null) return null;
        return (Bindings)_bindings.remove(canonicalize(attribute));
    }
818057
private void setFieldValue(Object entity, Object thriftColumnValue, Attribute attribute)
    {
        if (attribute != null)
        {
            try
            {
                if (thriftColumnValue.getClass().isAssignableFrom(String.class))
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), (String) thriftColumnValue);
                }
                else if (CassandraDataTranslator.isCassandraDataTypeClass(((AbstractAttribute) attribute)
                        .getBindableJavaType()))
                {
                    Object decomposed = null;
                    try
                    {
                        Class<?> clazz = ((AbstractAttribute) attribute).getBindableJavaType();
                        decomposed = CassandraDataTranslator.decompose(clazz, thriftColumnValue, false);
                    }
                    catch (Exception e)
                    {
                        String tableName = entity.getClass().getSimpleName();
                        String fieldName = attribute.getName();
                        String msg = "Decomposing failed for `" + tableName + "`.`" + fieldName
                                + "`, did you set the correct type in your entity class?";
                        log.error(msg, e);
                        throw new KunderaException(msg, e);
                    }
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), decomposed);
                }
                else
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), (byte[]) thriftColumnValue);
                }

            }
            catch (PropertyAccessException pae)
            {
                log.warn("Error while setting field value, Caused by: .", pae);
            }
        }
    }
452547
public void remove_attribute(final String attname) throws DevFailed {
	// Remove property in database
	if (Util._UseDb) {
	    final DeviceProxy dev = new DeviceProxy(device_name);
	    final DbAttribute da = dev.get_attribute_property(attname);
	    dev.delete_attribute_property(da);

	}
	dev_attr.remove_attribute(attname);
    }
1187116
protected void fireAttributeChangedEvent(String name, AttributeValue oldValue, AttributeValue currentValue) {
		if (this.listeners != null && isEventFirable()) {
			final AttributeChangeEvent event = new AttributeChangeEvent(
					//source
					this,
					//type
					Type.VALUE_UPDATE,
					//old name
					name,
					//old value
					oldValue,
					//current name
					name,
					//current value
					currentValue);
			for (final AttributeChangeListener listener : this.listeners) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
558286
public void remove() throws DBException
    {
        super.remove();
        Iterator<BaseTable> iterator = this.getTables();
        while (iterator.hasNext())
        {
            BaseTable table = iterator.next();
            if ((table != null) && (table != this.getNextTable()))
            {
                if ((table.getRecord().getEditMode() == Constants.EDIT_IN_PROGRESS) || (table.getRecord().getEditMode() == Constants.EDIT_CURRENT))
                    table.remove();
            }
        }
    }
718599
public void setAttributeEditable(Attribute attribute, boolean editable) {
		attribute.setEditable(editable);
		if (!(attribute instanceof LazyAttribute)) { // should not instantiate lazy attributes!
			if (attribute instanceof ManyToOneAttribute) {
				setAttributeEditable(((ManyToOneAttribute) attribute).getValue(), editable);
			} else if (attribute instanceof OneToManyAttribute) {
				List<AssociationValue> values = ((OneToManyAttribute) attribute).getValue();
				for (AssociationValue value : values) {
					setAttributeEditable(value, editable);
				}
			}
		}
	}
1042907
@Override
  public void addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamilyDesc)
      throws IOException {
    modifyColumns(tableName, columnFamilyDesc.getNameAsString(), "add",
            ModifyTableBuilder.newBuilder(tableName).add(TableAdapter2x.toHColumnDescriptor(columnFamilyDesc)));
  }