Examples of findByIPAddress()


Examples of com.intel.mtwilson.as.controller.TblHostsJpaController.findByIPAddress()

                                    TblHosts tblHosts = tblHostsJpaController.findByName(hostnameOrAddress);
                                    if (tblHosts != null) {
                                            return new HostResponse(ErrorCode.OK); // host name exists in
                                                                                                                            // database
                                    }
                                    tblHosts = tblHostsJpaController.findByIPAddress(hostnameOrAddress);
                                    if (tblHosts != null) {
                                            return new HostResponse(ErrorCode.OK); // host IP address exists in
                                                                                                                            // database
                                    }
                                    return new HostResponse(ErrorCode.AS_HOST_NOT_FOUND);
View Full Code Here

Examples of com.intel.mtwilson.as.controller.TblHostsJpaController.findByIPAddress()

  private void checkForDuplicate(TxtHost host) throws CryptographyException {
    TblHostsJpaController tblHostsJpaController = new TblHostsJpaController(
        getEntityManagerFactory());
    TblHosts tblHosts1 = tblHostsJpaController.findByName(host.getHostName()
        .toString()); // datatype.Hostname
    TblHosts tblHosts2 = tblHostsJpaController.findByIPAddress(host.getIPAddress()
        .toString());
    if (tblHosts1 != null) {
      throw new ASException(
          ErrorCode.AS_HOST_EXISTS,
          host.getHostName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.