コード例 #1
0
  public boolean isLocked(final Entity order) {
    if (order == null) {
      return true;
    }

    String state = order.getStringField(OrderFields.STATE);

    return (OrderStateStringValues.ACCEPTED.equals(state)
            || OrderStateStringValues.IN_PROGRESS.equals(state)
            || OrderStateStringValues.INTERRUPTED.equals(state))
        && isLocked();
  }
 private boolean checkIfOrderStateIsCorrect(final String state) {
   return (OrderStateStringValues.PENDING.equals(state)
       || OrderStateStringValues.ACCEPTED.equals(state)
       || OrderStateStringValues.IN_PROGRESS.equals(state)
       || OrderStateStringValues.INTERRUPTED.equals(state));
 }