/** * Converts the soap model instance into a normal model instance. * * @param soapModel the soap model instance to convert * @return the normal model instance */ public static Vertical toModel(VerticalSoap soapModel) { Vertical model = new VerticalImpl(); model.setId(soapModel.getId()); model.setDescription(soapModel.getDescription()); model.setEdition(soapModel.getEdition()); return model; }
public int compareTo(Vertical vertical) { int pk = vertical.getPrimaryKey(); if (getPrimaryKey() < pk) { return -1; } else if (getPrimaryKey() > pk) { return 1; } else { return 0; } }
public boolean equals(Object obj) { if (obj == null) { return false; } Vertical vertical = null; try { vertical = (Vertical) obj; } catch (ClassCastException cce) { return false; } int pk = vertical.getPrimaryKey(); if (getPrimaryKey() == pk) { return true; } else { return false; } }