Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MIchaelMainer committed Sep 8, 2020
2 parents d965b9c + 5399f6e commit 70d6cbf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/GraphODataTemplateWriter/CodeHelpers/Java/TypeHelperJava.cs
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ public static string CreatePackageDefForEnum(this CustomT4Host host)
}
public static string GetPackagePrefix(this OdcmObject obj)
{
switch(obj)
switch (obj)
{
case OdcmEnum e:
return "models.generated";
Expand Down Expand Up @@ -860,7 +860,7 @@ public static string CreatePackageDefForBaseMethodRequestBuilder(this CustomT4Ho
sb.Append("\n");

var imports = host.CurrentType.AsOdcmMethod().WithOverloads().SelectMany(x => ImportClassesOfMethodParameters(x));
sb.Append(imports.Any() ? imports.Aggregate((x, y) => $"{x}{Environment.NewLine}{y}"): string.Empty);
sb.Append(imports.Any() ? imports.Aggregate((x, y) => $"{x}{Environment.NewLine}{y}") : string.Empty);
return sb.ToString();
}

Expand Down Expand Up @@ -1463,14 +1463,15 @@ public static string CreatePropertyDef(IEnumerable<OdcmProperty> properties, boo
var propertyFormat = format;
if (property.IsCollection)
{
if (!property.IsNavigation())
if (property.IsNavigation())
{
propertyType = "java.util.List<" + property.GetTypeString() + ">";
propertyType = TypeCollectionPage(property);
if (!property.ContainsTarget)
propertyFormat = collectionFormat;
}
else
{
propertyType = TypeCollectionPage(property);
propertyFormat = collectionFormat;
propertyType = "java.util.List<" + property.GetTypeString() + ">";
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ public class CloudCommunications extends Entity implements IJsonBackedObject {
* The Calls.
*
*/
@SerializedName("calls")
@Expose
public CallCollectionPage calls;

/**
* The Call Records.
*
*/
@SerializedName("callRecords")
@Expose
public CallRecordCollectionPage callRecords;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ public class Schedule extends Entity implements IJsonBackedObject {
* The Times Off.
*
*/
@SerializedName("timesOff")
@Expose
public TimeOffCollectionPage timesOff;

/**
* The Time Off Requests.
*
*/
@SerializedName("timeOffRequests")
@Expose
public TimeOffRequestCollectionPage timeOffRequests;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,16 @@ public class CallRecord extends Entity implements IJsonBackedObject {
* The Sessions.
*
*/
@SerializedName("sessions")
@Expose
public SessionCollectionPage sessions;

/**
* The Recipients.
*
*/
@SerializedName("recipients")
@Expose
public EntityType2CollectionPage recipients;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public class Session extends Entity implements IJsonBackedObject {
* The Segments.
*
*/
@SerializedName("segments")
@Expose
public SegmentCollectionPage segments;


Expand Down

0 comments on commit 70d6cbf

Please sign in to comment.