@RequiresSession
  public List<KerberosKeytabPrincipalEntity> findByHostAndKeytab(Long hostId, String keytabPath) {
    TypedQuery<KerberosKeytabPrincipalEntity> query = entityManagerProvider.get().
      createNamedQuery("KerberosKeytabPrincipalEntity.findByHostAndKeytab", KerberosKeytabPrincipalEntity.class);
    query.setParameter("hostId", hostId);
    query.setParameter("keytabPath", keytabPath);
    return daoUtils.selectList(query);
  }
Find or create {@link KerberosKeytabPrincipalEntity} with specified dependencies.

@param kerberosKeytabEntity {@link KerberosKeytabEntity} which owns this principal
@param hostEntity           {@link HostEntity} which owns this principal
@param kerberosPrincipalEntity      {@link KerberosPrincipalEntity} which related to this principal
@return evaluated entity
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/KerberosKeytabPrincipalDAO.java