public Logix createNewLogix(String systemName,String userName){
  Logix x;
  if (userName != null && !userName.equals("")) {
    x=getByUserName(userName);
    if (x != null) {
      return null;
    }
  }
  x=getBySystemName(systemName);
  if (x == null) {
    x=getBySystemName(systemName.toUpperCase());
  }
  if (x != null) {
    return null;
  }
  x=new DefaultLogix(systemName,userName);
  register(x);
  if (systemName.startsWith("IX:AUTO:")) {
    try {
      int autoNumber=Integer.parseInt(systemName.substring(8));
      if (autoNumber > lastAutoLogixRef) {
        lastAutoLogixRef=autoNumber;
      }
    }
 catch (    NumberFormatException e) {
      log.warn("Auto generated SystemName " + systemName + " is not in the correct format");
    }
  }
  return x;
}

public Logix createNewLogix ( String systemName , String userName ) { Logix x ; if ( userName != null && ! userName . equals ( "" ) ) { x = getByUserName ( userName ) ; if ( x != null ) { return null ; } } x = getBySystemName ( systemName ) ; if ( x == null ) { x = getBySystemName ( systemName . toUpperCase ( ) ) ; } if ( x != null ) { return null ; } x = new DefaultLogix ( systemName , userName ) ; register ( x ) ; if ( systemName . startsWith ( "IX:AUTO:" ) ) { try { int autoNumber = Integer . parseInt ( systemName . substring ( 8 ) ) ; if ( autoNumber > lastAutoLogixRef ) { lastAutoLogixRef = autoNumber ; } } catch ( NumberFormatException e ) { log . warn ( "Auto generated SystemName " + systemName + " is not in the correct format" ) ; } } return x ; }
method to create a new logix if the logix does not exist returns null if a logix with the same systemname or username already exists , or if there is trouble creating a new logix .
