Package com.pv.sdm.user.db.model

Examples of com.pv.sdm.user.db.model.User


   }
  
   @Test
   public void andNotEqual() {
      SelectBuilder builder = (SelectBuilder)_annotationFactory.select();
      User user = builder.mock(User.class);
     
      builder.columns(user.getId(), user.getUserName());
     
      builder.andNotEqual(user.getId(), 1L);
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "SELECT user.id,user.userName FROM user_mx_14.user WHERE user.id != ?",
            statment.getSql());
View Full Code Here


   }
  
   @Test
   public void orderBy() {
      SelectBuilder builder = (SelectBuilder)_annotationFactory.select();
      User user = builder.mock(User.class);
     
      builder.columns(user.getId(), user.getUserName());
     
      builder.and(user.getId(), 1L);
     
      builder.orderBy(user.getUserName());
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "SELECT user.id,user.userName"
            + " FROM user_mx_14.user"
View Full Code Here

   }
  
   @Test
   public void getName() {
      SelectBuilder builder = (SelectBuilder)_annotationFactory.select();
      User user = builder.mock(User.class);
     
      Assert.assertEquals("id", builder.getName(user.getId()));
      Assert.assertEquals("password", builder.getName(user.getPassword()));
      Assert.assertEquals("userName", builder.getName(user.getUserName()));
   }
View Full Code Here

   }
  
   @Test
   public void getNameQualified() {
      SelectBuilder builder = (SelectBuilder)_annotationFactory.select();
      User user = builder.mock(User.class);
     
      String qualifier = "user" + ".";
      Assert.assertEquals(qualifier + "id",
            builder.getNameQualified(user.getId()));
      Assert.assertEquals(qualifier + "password",
            builder.getNameQualified(user.getPassword()));
      Assert.assertEquals(qualifier + "userName",
            builder.getNameQualified(user.getUserName()));
   }
View Full Code Here

   }
  
   @Test
   public void delete() {
      DeleteBuilder builder = (DeleteBuilder)_annotationFactory.delete();
      User user = builder.mock(User.class);
     
      builder.and(user.getId(),new Long(1L));
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "DELETE FROM user_mx_14.user WHERE user.id = ?",
            statment.getSql());
View Full Code Here

   ////
  
   @Test
   public void and() {
      SelectBuilder builder = (SelectBuilder)_annotationFactory.select();
      User user = builder.mock(User.class);
     
      builder.columns(user.getId(), user.getUserName());
      user.setId(1L);
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "SELECT user.id,user.userName FROM user_mx_14.user WHERE user.id = ?",
            statment.getSql());
View Full Code Here

   }
  
   @Test
   public void delete() {
      DeleteBuilder builder = (DeleteBuilder)_annotationFactory.delete();
      User user = builder.mock(User.class);
      user.setId(1L);
     
      IQuery statment = builder.build();
      Assert.assertEquals(
            "DELETE FROM user_mx_14.user WHERE user.id = ?",
            statment.getSql());
View Full Code Here

TOP

Related Classes of com.pv.sdm.user.db.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.