View Javadoc

    1   package sharin.sql.generator;
    2
    3   import sharin.sql.Sql;
    4
    5   public interface SqlGenerator {
    6
    7       public Sql countAll();
    8
    9       public Sql countBySample(Object sample);
    10
    11      public Sql countBySamples(Object... samples);
    12
    13      public Sql selectAll(String propExpr, String orderExpr);
    14
    15      public Sql selectBySample(String propExpr, String orderExpr, Object sample);
    16
    17      public Sql selectBySamples(String propExpr, String orderExpr,
    18              Object... samples);
    19
    20      public Sql selectById(String propExpr, Object id);
    21
    22      public Sql selectByIds(String propExpr, String orderExpr, Object... ids);
    23
    24      public Sql insert(String propExpr, Object entity);
    25
    26      public Sql updateAll(String propExpr, Object entity);
    27
    28      public Sql updateBySample(String propExpr, Object entity, Object sample);
    29
    30      public Sql updateBySamples(String propExpr, Object entity,
    31              Object... samples);
    32
    33      public Sql updateById(String propExpr, Object entity, Object id);
    34
    35      public Sql updateByIds(String propExpr, Object entity, Object... ids);
    36
    37      public Sql deleteAll();
    38
    39      public Sql deleteBySample(Object sample);
    40
    41      public Sql deleteBySamples(Object... samples);
    42
    43      public Sql deleteById(Object id);
    44
    45      public Sql deleteByIds(Object... ids);
    46  }