BrightSide Workbench Full Report + Source Code
org.turro.alliance.db.entities.AxCategory Class Reference
Inheritance diagram for org.turro.alliance.db.entities.AxCategory:
Collaboration diagram for org.turro.alliance.db.entities.AxCategory:

Public Member Functions

Long getCategoryId ()
 
void setCategoryId (Long categoryId)
 
String getName ()
 
void setName (String name)
 
String getUniquePath ()
 
void setUniquePath (String uniquePath)
 
AxCategory getParent ()
 
void setParent (AxCategory parent)
 
String getPathName ()
 
void setPathName (String pathName)
 
Object entityId ()
 
boolean isEmpty ()
 
void prepareSave ()
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Static Public Member Functions

static AxCategory fromJson (JsonValue value)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 42 of file AxCategory.java.

Member Function Documentation

◆ entityId()

Object org.turro.alliance.db.entities.AxCategory.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 109 of file AxCategory.java.

109  {
110  return categoryId;
111  }

◆ fromJson()

static AxCategory org.turro.alliance.db.entities.AxCategory.fromJson ( JsonValue  value)
static

Definition at line 141 of file AxCategory.java.

141  {
142  return IJSONizable.fromJson(value.toString(), AxCategory.class);
143  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCategoryId()

Long org.turro.alliance.db.entities.AxCategory.getCategoryId ( )

Definition at line 56 of file AxCategory.java.

56  {
57  return categoryId;
58  }
Here is the caller graph for this function:

◆ getName()

String org.turro.alliance.db.entities.AxCategory.getName ( )

Definition at line 64 of file AxCategory.java.

64  {
65  return name;
66  }
Here is the caller graph for this function:

◆ getParent()

AxCategory org.turro.alliance.db.entities.AxCategory.getParent ( )

Definition at line 80 of file AxCategory.java.

80  {
81  return parent;
82  }
Here is the caller graph for this function:

◆ getPathName()

String org.turro.alliance.db.entities.AxCategory.getPathName ( )

Definition at line 88 of file AxCategory.java.

88  {
89  if(pathName == null) {
90  AxCategory current = getParent();
91  StringBuilder sb = new StringBuilder(getName());
92  while(current != null) {
93  sb.insert(0, Chars.forward().spaced().toString())
94  .insert(0, current.getName());
95  current = current.getParent();
96  }
97  pathName = sb.toString();
98  }
99  return pathName;
100  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUniquePath()

String org.turro.alliance.db.entities.AxCategory.getUniquePath ( )

Definition at line 72 of file AxCategory.java.

72  {
73  return uniquePath;
74  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.alliance.db.entities.AxCategory.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 114 of file AxCategory.java.

114  {
115  return Strings.isBlank(name);
116  }

◆ prepareSave()

void org.turro.alliance.db.entities.AxCategory.prepareSave ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 119 of file AxCategory.java.

119  {
120  IDaoEntity.super.prepareSave();
121  if(Zero.orNull(categoryId)) {
122  categoryId = IdUtils.getNewLongIdFromLong(new AlliancePU(), "AxCategory", "categoryId");
123  }
124  uniquePath = UniquePath.getPath(this, c -> Long.toString(c.getCategoryId()), c -> c.getParent());
125  if(Strings.isBlank(uniquePath)) parent = null;
126  }
Here is the call graph for this function:

◆ setCategoryId()

void org.turro.alliance.db.entities.AxCategory.setCategoryId ( Long  categoryId)

Definition at line 60 of file AxCategory.java.

60  {
61  this.categoryId = categoryId;
62  }

◆ setName()

void org.turro.alliance.db.entities.AxCategory.setName ( String  name)

Definition at line 68 of file AxCategory.java.

68  {
69  this.name = name;
70  }
Here is the caller graph for this function:

◆ setParent()

void org.turro.alliance.db.entities.AxCategory.setParent ( AxCategory  parent)

Definition at line 84 of file AxCategory.java.

84  {
85  this.parent = parent;
86  }

◆ setPathName()

void org.turro.alliance.db.entities.AxCategory.setPathName ( String  pathName)

Definition at line 102 of file AxCategory.java.

102  {
103  this.pathName = pathName;
104  }

◆ setUniquePath()

void org.turro.alliance.db.entities.AxCategory.setUniquePath ( String  uniquePath)

Definition at line 76 of file AxCategory.java.

76  {
77  this.uniquePath = uniquePath;
78  }

◆ toJson() [1/2]

String org.turro.alliance.db.entities.AxCategory.toJson ( )

Definition at line 131 of file AxCategory.java.

131  {
132  getPathName();
133  return toJson(this);
134  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toJson() [2/2]

String org.turro.alliance.db.entities.AxCategory.toJson ( Map< String, Object >  properties)

Definition at line 137 of file AxCategory.java.

137  {
138  return toJson(this, properties);
139  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: