public static PDataPartitionFormat parsePDataPartitionFormat(String s){
  if (s.equalsIgnoreCase("ROW_WISE"))   return ROW_WISE;
 else   if (s.equalsIgnoreCase("ROW_BLOCK_WISE"))   return ROW_BLOCK_WISE;
 else   if (s.equalsIgnoreCase("ROW_BLOCK_WISE_N"))   return ROW_BLOCK_WISE_N;
 else   if (s.equalsIgnoreCase("COLUMN_WISE"))   return COLUMN_WISE;
 else   if (s.equalsIgnoreCase("COLUMN_BLOCK_WISE"))   return COLUMN_BLOCK_WISE;
 else   if (s.equalsIgnoreCase("COLUMN_BLOCK_WISE_N"))   return COLUMN_BLOCK_WISE_N;
 else   if (s.equalsIgnoreCase("BLOCK_WISE_M_N"))   return BLOCK_WISE_M_N;
 else   return NONE;
}

public static PDataPartitionFormat parsePDataPartitionFormat ( String s ) { if ( s . equalsIgnoreCase ( "ROW_WISE" ) ) return ROW_WISE ; else if ( s . equalsIgnoreCase ( "ROW_BLOCK_WISE" ) ) return ROW_BLOCK_WISE ; else if ( s . equalsIgnoreCase ( "ROW_BLOCK_WISE_N" ) ) return ROW_BLOCK_WISE_N ; else if ( s . equalsIgnoreCase ( "COLUMN_WISE" ) ) return COLUMN_WISE ; else if ( s . equalsIgnoreCase ( "COLUMN_BLOCK_WISE" ) ) return COLUMN_BLOCK_WISE ; else if ( s . equalsIgnoreCase ( "COLUMN_BLOCK_WISE_N" ) ) return COLUMN_BLOCK_WISE_N ; else if ( s . equalsIgnoreCase ( "BLOCK_WISE_M_N" ) ) return BLOCK_WISE_M_N ; else return NONE ; }
note : robust version of valueof in order to return none without exception if misspelled or non - existing and for case - insensitivity .
