code: private Object onSequenceGenerator(EntityMetadata m, Client<?> client, IdDiscriptor keyValue, Object e)
      {
          Object seqgenerator = getAutoGenClazz(client);
          if (seqgenerator instanceof SequenceGenerator)
          {
              Object generatedId = ((SequenceGenerator) seqgenerator).generate(
                      keyValue.getSequenceDiscriptor(), client, m.getIdAttribute().getJavaType().getSimpleName());
              try
              {
                  generatedId = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(),
                          generatedId.getClass(), generatedId);
                  PropertyAccessorHelper.setId(e, m, generatedId);
                  return generatedId;
              }
              catch (IllegalArgumentException iae)
              {
                  log.error("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType());
                  throw new KunderaException("Unknown integral data type for ids : " + m.getIdAttribute().getJavaType(),
                          iae);
              }
          }
          throw new IllegalArgumentException(GenerationType.class.getSimpleName() + "." + GenerationType.SEQUENCE
                  + " Strategy not supported by this client :" + client.getClass().getName());
      }
docs: Generate Id when given sequence generation strategy.
  
  @param m
  @param client
  @param keyValue
  @param e