@Override public boolean delete(AppContext ctx,StatePK objectId){
  State state=read(ctx,objectId);
  if (state.getShortcutId() == null) {
    return super.delete(ctx,objectId);
  }
 else {
    throw new APIException("Forbidden, this State is already associated to Shortcut : " + state.getShortcutId(),ctx.isNoError());
  }
}

@ Override public boolean delete ( AppContext ctx , StatePK objectId ) { State state = read ( ctx , objectId ) ; if ( state . getShortcutId ( ) == null ) { return super . delete ( ctx , objectId ) ; } else { throw new APIException ( "Forbidden, this State is already associated to Shortcut : " + state . getShortcutId ( ) , ctx . isNoError ( ) ) ; } }
prevent from deleting a state if associated to a shortcut
