Package com.google.code.lightssh.project.security.entity

Examples of com.google.code.lightssh.project.security.entity.LoginFailure


  public void save(LoginAccount la,String loginName,String ip,String sessionId ){
    if( la== null )
      return ;
   
    ListPage<LoginFailure> page = new ListPage<LoginFailure>(1);
    LoginFailure sameUser = new LoginFailure();
    sameUser.setSessionId(sessionId);
    page = list(page,sameUser);
   
    LoginFailure old = null;
    if( page.getList() != null && page.getList().size() > 0 ){
      old = page.getList().get(0);
      old.setLastUpdateTime(Calendar.getInstance());
      old.incFailureCount();
      dao.update(old);
    }else{
      LoginFailure t = new LoginFailure();
      t.setAccount(la);
      t.setLoginName(loginName);
      t.setIp(ip);
      t.setSessionId(sessionId);
      t.incFailureCount();
      dao.create(t);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.project.security.entity.LoginFailure

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.