Skip to content

Commit

Permalink
Add javadocs (Azure#28641)
Browse files Browse the repository at this point in the history
  • Loading branch information
srnagar authored May 4, 2022
1 parent b48e4c5 commit 4527308
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
public class AppConfigurationSample {
private static final String AZURE_APP_CONFIGURATION_CONNECTION_STRING = System.getenv("AZURE_APP_CONFIGURATION_CONNECTION_STRING");

/**
* The method to run the app configuration sample.
*/
public static void runSample() {
System.out.println("\n================================================================");
System.out.println(" Starting App Configuration Sample");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,58 @@

package com.azure.aot.graalvm.samples.cosmos;

/**
* The address model.
*/
public class Address {
private String state = "";
private String county = "";
private String city = "";

/**
* Returns the state.
* @return the state.
*/
public String getState() {
return state;
}

/**
* Sets the state.
* @param state the state.
*/
public void setState(String state) {
this.state = state;
}

/**
* Returns the county.
* @return the county.
*/
public String getCounty() {
return county;
}

/**
* Sets the county.
* @param county the county.
*/
public void setCounty(String county) {
this.county = county;
}

/**
* Returns the city.
* @return the city.
*/
public String getCity() {
return city;
}

/**
* Sets the city.
* @param city the city.
*/
public void setCity(String city) {
this.city = city;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,92 @@

import java.util.Arrays;

/**
* The child model.
*/
public class Child {
private String familyName;
private String firstName;
private String gender;
private int grade;
private Pet[] pets = {};

/**
* Returns the family name.
* @return the family name.
*/
public String getFamilyName() {
return familyName;
}

/**
* Sets the family name.
* @param familyName the family name.
*/
public void setFamilyName(String familyName) {
this.familyName = familyName;
}

/**
* Returns the first name.
* @return the first name.
*/
public String getFirstName() {
return firstName;
}

/**
* Sets the first name.
* @param firstName the first name.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}

/**
* Returns the gender.
* @return the gender.
*/
public String getGender() {
return gender;
}

/**
* Sets the gender.
* @param gender the gender.
*/
public void setGender(String gender) {
this.gender = gender;
}

/**
* Returns the grade.
* @return the grade.
*/
public int getGrade() {
return grade;
}

/**
* Sets the grade.
* @param grade the grade.
*/
public void setGrade(int grade) {
this.grade = grade;
}

/**
* Returns the pets array.
* @return the pets array.
*/
public Pet[] getPets() {
return Arrays.copyOf(pets, pets.length);
}

/**
* Sets the pets array.
* @param pets the pets array.
*/
public void setPets(Pet[] pets) {
this.pets = Arrays.copyOf(pets, pets.length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public class CosmosSample {

private static final Logger LOGGER = LoggerFactory.getLogger(CosmosSample.class);

/**
* The method to run the cosmos sample.
*/
public static void runSample() {
System.out.println("\n================================================================");
System.out.println(" Starting Cosmos Sample");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
package com.azure.aot.graalvm.samples.cosmos;


/**
* Helper class to get family details.
*/
public class Families {

/**
* Returns the family details of Andersen family.
* @return the family details of Andersen family.
*/
public static Family getAndersenFamilyItem() {
Family andersenFamily = new Family();
andersenFamily.setId("Andersen-" + System.currentTimeMillis());
Expand Down Expand Up @@ -42,6 +49,10 @@ public static Family getAndersenFamilyItem() {
return andersenFamily;
}

/**
* Returns the family details of Wakefield family.
* @return the family details of Wakefield family.
*/
public static Family getWakefieldFamilyItem() {
Family wakefieldFamily = new Family();
wakefieldFamily.setId("Wakefield-" + System.currentTimeMillis());
Expand Down Expand Up @@ -90,6 +101,10 @@ public static Family getWakefieldFamilyItem() {
return wakefieldFamily;
}

/**
* Returns the family details of Johnson family.
* @return the family details of Johnson family.
*/
public static Family getJohnsonFamilyItem() {
Family johnsonFamily = new Family();
johnsonFamily.setId("Johnson-" + System.currentTimeMillis());
Expand All @@ -106,6 +121,10 @@ public static Family getJohnsonFamilyItem() {
return johnsonFamily;
}

/**
* Returns the family details of Smith family.
* @return the family details of Smith family.
*/
public static Family getSmithFamilyItem() {
Family smithFamily = new Family();
smithFamily.setId("Smith-" + System.currentTimeMillis());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

import java.util.Arrays;

/**
* The family model.
*/
public class Family {
private String id = "";
private String lastName = "";
Expand All @@ -14,59 +17,114 @@ public class Family {
private Address address = new Address();
private boolean isRegistered = false;


/**
* Returns the family id.
* @return the family id.
*/
public String getId() {
return id;
}

/**
* Sets the family id.
* @param id the family id.
*/
public void setId(String id) {
this.id = id;
}

/**
* Returns the family last name.
* @return the family last name.
*/
public String getLastName() {
return lastName;
}

/**
* Sets the family last name.
* @param lastName the family last name.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}

/**
* Returns the district.
* @return the district.
*/
public String getDistrict() {
return district;
}

/**
* Sets the district.
* @param district the district.
*/
public void setDistrict(String district) {
this.district = district;
}

/**
* Returns the parents array.
* @return the parents array.
*/
public Parent[] getParents() {
return Arrays.copyOf(parents, parents.length);
}

/**
* Sets the parents array.
* @param parents the parents array.
*/
public void setParents(Parent[] parents) {
this.parents = Arrays.copyOf(parents, parents.length);
}

/**
* Returns the children array.
* @return the children array.
*/
public Child[] getChildren() {
return Arrays.copyOf(children, children.length);
}

/**
* Sets the children array.
* @param children the children array.
*/
public void setChildren(Child[] children) {
this.children = Arrays.copyOf(children, children.length);
}

/**
* Returns the address.
* @return the address.
*/
public Address getAddress() {
return address;
}

/**
* Sets the address.
* @param address the address.
*/
public void setAddress(Address address) {
this.address = address;
}

/**
* Returns true if the family is registered.
* @return true if the family is registered.
*/
public boolean isRegistered() {
return isRegistered;
}

/**
* Sets the registration state of the family.
* @param isRegistered the registration state of the family
*/
public void setRegistered(boolean isRegistered) {
this.isRegistered = isRegistered;
}
Expand Down
Loading

0 comments on commit 4527308

Please sign in to comment.