@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getPasswordLastUsed() == null) ? 0 : getPasswordLastUsed().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
public User unmarshall(StaxUnmarshallerContext context) throws Exception { User user = new User(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; user.setPath(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; user.setUserName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; user.setUserId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; user.setArn(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; user.setCreateDate(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; user.setPasswordLastUsed(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; user.setPermissionsBoundary(AttachedPermissionsBoundaryStaxUnmarshaller.getInstance().unmarshall(context)); continue; user.withTags(new ArrayList<Tag>()); continue; user.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateUserResult == false) return false; CreateUserResult other = (CreateUserResult) obj; if (other.getUser() == null ^ this.getUser() == null) return false; if (other.getUser() != null && other.getUser().equals(this.getUser()) == false) return false; return true; }
/** * Constructs a new User object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param path * The path to the user. For more information about paths, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the * <i>Using IAM</i> guide. * @param userName * The friendly name identifying the user. * @param userId * The stable and unique string identifying the user. For more information about IDs, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the * <i>Using IAM</i> guide. * @param arn * The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use * ARNs in policies, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM * Identifiers</a> in the <i>Using IAM</i> guide. * @param createDate * The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the * user was created. */ public User(String path, String userName, String userId, String arn, java.util.Date createDate) { setPath(path); setUserName(userName); setUserId(userId); setArn(arn); setCreateDate(createDate); }
for (User user : userdata) { if(user.getUserName().equals(u.getUserName())) { return true; } }
switch (columnIndex) { case 0: value = user.getUserUsername(); break; case 1: value = user.getUserName(); break; case 2: value = user.getUserPhone(); break; case 3: value = user.getUserNic(); break; case 4: value = user.getUserAddress(); break; case 5: value = user.getUserEmail(); break;
arn = user.getUser().getArn(); } catch (AmazonServiceException e) { if (e.getErrorCode().compareTo("AccessDenied") == 0) {
for (User user : users) { final ListAccessKeysRequest listAccessKeysRequest = new ListAccessKeysRequest(); listAccessKeysRequest.setUserName(user.getUserName()); final List<AccessKeyMetadata> accessKeyMetadata = iamClient.listAccessKeys(listAccessKeysRequest).getAccessKeyMetadata(); awsAccountNumber = user.getArn().split(":")[4];
holder.userName.setText(o.getUserName()); holder.userCity.setText(o.getUserCity()+", "); holder.userState.setText(o.getUserState()+", "); holder.userCountry.setText(o.getUserCountry()); System.out.println("PIC: "+o.getUserPic()); holder.userPic.setTag(o.getUserPic()); imageLoader.DisplayImage(o.getUserPic(), a, holder.userPic);
user_position = helper.getUserPosition(); if(user_position.size() > 0){ User user = user_position.get(0); user = String.valueOf(user.getUserName()); position=String.valueOf(user.getUserPosition()); TextView textView = (TextView) findViewById(R.id.user); textView.setText(user+"("+position+")"); } else Log.e("No user", "NO user found");
if (action.equals("Login")) { String usernameInput = usernameField.getText().toString(); String passwdInput = passwdField.getText().toString(); boolean isLoggedIn = false; passwdField.setText(""); for (User usr : usrList) { if (usr.getUserName().equals(usernameInput)) { if (usr.getPassWd().equals(passwdInput)) { isLoggedIn = true; frame.getContentPane().removeAll(); GameScreen gmeScreen = new GameScreen(frame, usrList, usr); } } } if (isLoggedIn == false) { JOptionPane.showMessageDialog(null, "Username/Password may be In-correct"); } }
holder.title.setText(user.getUserName()); holder.subTitle.setText(user.getState); if (!TextUtils.isEmpty(user.getUserThumb())) { Picasso.with(context).load(user.getUserThumb) .error(R.drawable.dummy_image)
String USER_URI = "http://localhost:8080/AnyQserver/rest/users"; User user = new anyq.server.common.bean.User(); user.setUserId(15); user.setUserName("asd"); user.setUserPassword("asd"); Client client = Client.create(); String request = new Gson().toJson(user); System.out.println(request); WebResource r = client.resource(USER_URI); ClientResponse response = r.type(MediaType.APPLICATION_JSON).post( ClientResponse.class, request); System.out.println(response.getStatus());
/** * <p> * The friendly name identifying the user. * </p> * * @param userName * The friendly name identifying the user. * @return Returns a reference to this object so that method calls can be chained together. */ public User withUserName(String userName) { setUserName(userName); return this; }
/** * <p> * The stable and unique string identifying the user. For more information about IDs, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>Using * IAM</i> guide. * </p> * * @param userId * The stable and unique string identifying the user. For more information about IDs, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the * <i>Using IAM</i> guide. * @return Returns a reference to this object so that method calls can be chained together. */ public User withUserId(String userId) { setUserId(userId); return this; }
for (User u : returnAll) { if (u.getUserName().equals(uName)) { returnAll.remove(u); } }
/** * Constructs a new User object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param path * The path to the user. For more information about paths, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the * <i>Using IAM</i> guide. * @param userName * The friendly name identifying the user. * @param userId * The stable and unique string identifying the user. For more information about IDs, see <a * href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the * <i>Using IAM</i> guide. * @param arn * The Amazon Resource Name (ARN) that identifies the user. For more information about ARNs and how to use * ARNs in policies, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM * Identifiers</a> in the <i>Using IAM</i> guide. * @param createDate * The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the * user was created. */ public User(String path, String userName, String userId, String arn, java.util.Date createDate) { setPath(path); setUserName(userName); setUserId(userId); setArn(arn); setCreateDate(createDate); }
/** * <p> * The friendly name identifying the user. * </p> * * @param userName * The friendly name identifying the user. * @return Returns a reference to this object so that method calls can be chained together. */ public User withUserName(String userName) { setUserName(userName); return this; }
for (DataSnapshot chatSnapshot: snapshot.getChildren()) { User user = chatSnapshot.getValue(User.class); user.setUserId(chatSnapshot.getKey()); }