Code example for Column

Methods: setComment

0
 
  private void commentToOne(ToOne toOne, Column column) {
    String entityName = toOne.getReferencedEntityName();
    PersistentClass referClass = configuration.getClassMapping(entityName);
    if (null != referClass) {
      column.setComment(referClass.getTable().getComment() + " ID");
    } 
  } 
 
  @SuppressWarnings("unchecked") 
  private void commentProperty(Class<?> clazz, Table table, Property p) {
    if (null == p) return;
    if (p.getColumnSpan() == 1) {
      Column column = (Column) p.getColumnIterator().next();
      if (isForeignColumn(table, column)) {
        column.setComment(messages.get(clazz, p.getName()) + " ID");
      } else { 
        column.setComment(messages.get(clazz, p.getName()));
      } 
    } else if (p.getColumnSpan() > 1) {
Experience pair programming with AI  Get Codota for Java