Codota Logo
TSentryRole.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.sentry.api.generic.thrift.TSentryRole
constructor

Best Java code snippets using org.apache.sentry.api.generic.thrift.TSentryRole.<init> (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: apache/sentry

public TSentryRole deepCopy() {
 return new TSentryRole(this);
}
origin: apache/sentry

/**
 * Performs a deep copy on <i>other</i>.
 */
public TListSentryRolesResponse(TListSentryRolesResponse other) {
 if (other.isSetStatus()) {
  this.status = other.status;
 }
 if (other.isSetRoles()) {
  Set<TSentryRole> __this__roles = new HashSet<TSentryRole>(other.roles.size());
  for (TSentryRole other_element : other.roles) {
   __this__roles.add(new TSentryRole(other_element));
  }
  this.roles = __this__roles;
 }
}
origin: apache/sentry

 public Set<TSentryRole> execute(PersistenceManager pm) throws Exception {
  Set<TSentryRole> tRoles = Sets.newHashSet();
  pm.setDetachAllOnCommit(false); // No need to detach objects
  Set<MSentryRole> mSentryRoles = Sets.newHashSet();
  if(groups.contains(null)) {
   mSentryRoles.addAll(delegate.getAllRoles(pm));
  } else {
   mSentryRoles = delegate.getRolesForGroups(pm, groups);
  }
  for(MSentryRole mSentryRole: mSentryRoles) {
   String roleName = mSentryRole.getRoleName().intern();
   Set<String> groupNames = Sets.newHashSet();
   Set<MSentryGroup> mSentryGroups = mSentryRole.getGroups();
   for(MSentryGroup mSentryGroup: mSentryGroups) {
    groupNames.add(mSentryGroup.getGroupName());
   }
   tRoles.add(new TSentryRole(roleName, groupNames));
  }
  return tRoles;
 }
});
origin: apache/sentry

for (int _i34 = 0; _i34 < _set32.size; ++_i34)
 _elem33 = new TSentryRole();
 _elem33.read(iprot);
 struct.roles.add(_elem33);
origin: apache/sentry

 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TListSentryRolesResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus();
  struct.status.read(iprot);
  struct.setStatusIsSet(true);
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
   {
    org.apache.thrift.protocol.TSet _set37 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.roles = new HashSet<TSentryRole>(2*_set37.size);
    TSentryRole _elem38;
    for (int _i39 = 0; _i39 < _set37.size; ++_i39)
    {
     _elem38 = new TSentryRole();
     _elem38.read(iprot);
     struct.roles.add(_elem38);
    }
   }
   struct.setRolesIsSet(true);
  }
 }
}
origin: apache/sentry

TSentryRole tSentryRole = new TSentryRole(roleName, Sets.newHashSet(groupName));
mockTRoles.add(tSentryRole);
Mockito.when(mockStore.getTSentryRolesByGroupName(anyString(), anySetOf(String.class)))
org.apache.sentry.api.generic.thriftTSentryRole<init>

Javadoc

Performs a deep copy on other.

Popular methods of TSentryRole

  • getGroups
  • getRoleName
  • equals
  • isSetGroups
    Returns true if field groups is set (has been assigned a value) and false otherwise
  • isSetRoleName
    Returns true if field roleName is set (has been assigned a value) and false otherwise
  • read
  • setGroups
  • setGroupsIsSet
  • setRoleName
  • setRoleNameIsSet
  • toString
  • unsetGroups
  • toString,
  • unsetGroups,
  • unsetRoleName,
  • validate,
  • write

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now