留言板
What is classPK?
I can't seem to find a solid definition of what "classPK" is, can someone answer this for me? I've searched the LifeRay forums and have found many references to it, but no definitions.
If it helps, I'm analyzing the relationships between the tables used by the Message Board portlet.
If it helps, I'm analyzing the relationships between the tables used by the Message Board portlet.
I also need a explanation of classPK, because I want to extend the page-rating and the page-commenting functionality.
Anyone here how knows about classPK?
Anyone here how knows about classPK?
You can comment about some certain types of entities, say for example, a blog entry with pk 23, then classNameId will refer to a classname_ table row that holds value "com.liferay...BlogsEntry" and classPK will be 23.
Claudia, I guess the class name you will use is "com.liferay.portal.model.Layout".
Claudia, I guess the class name you will use is "com.liferay.portal.model.Layout".
Thanks Bruno! So the className is essentially a reference to a database table and the classPK is the primary key reference in that table.
So, for example, when looking at the Subscription table, if I see a record with a classNameId of 10063 and a classPK of 11010 then:
1. I go to the className table and look for the value related to classNameId of 10063.
2. Seeing that the value for 10063 is "com.liferay.portlet.messageboards.model.MBCategory", I know to next look at the MBCATEGORY liferay database table.
3. I now look for a record in here with a categoryId equal to my initial classPK in the subscription table (11010).
I understand whats going on here, thanks much for the clarification.
-Jay
So, for example, when looking at the Subscription table, if I see a record with a classNameId of 10063 and a classPK of 11010 then:
1. I go to the className table and look for the value related to classNameId of 10063.
2. Seeing that the value for 10063 is "com.liferay.portlet.messageboards.model.MBCategory", I know to next look at the MBCATEGORY liferay database table.
3. I now look for a record in here with a categoryId equal to my initial classPK in the subscription table (11010).
I understand whats going on here, thanks much for the clarification.
-Jay
I know this question is old, but what is class name and classPk as relates to the sanitize function? I'm implementing the sanitize function.
It is still the same answer.
Class name is the name of an entity and class PK is the primary key value which represents a unique entity.
Conceptually it allows a Liferay table to refer to any entity using a loosely defined/weak reference. For example, the AssentEntry table/entity is for a Liferay asset (a unique value), but the asset refers to some other entity such as a blog entry, a message board post, a web content article, ... The class name defines the type of entity and the class PK is the primary key (so you can identify a unique blog entry, message board post, web content article), ...
For whatever sanitize function you're talking about, the concept of the class name and pk is still the same.
Class name is the name of an entity and class PK is the primary key value which represents a unique entity.
Conceptually it allows a Liferay table to refer to any entity using a loosely defined/weak reference. For example, the AssentEntry table/entity is for a Liferay asset (a unique value), but the asset refers to some other entity such as a blog entry, a message board post, a web content article, ... The class name defines the type of entity and the class PK is the primary key (so you can identify a unique blog entry, message board post, web content article), ...
For whatever sanitize function you're talking about, the concept of the class name and pk is still the same.
https://proliferay.com/concept-of-classpk-in-liferay/
Please refer this link, you will understand easily the concept of classpk in liferay.
Please refer this link, you will understand easily the concept of classpk in liferay.
Hi,
In simple words className is nothing but entity name/Table name and classPk is nothing but Primary key of the entity.
In simple words className is nothing but entity name/Table name and classPk is nothing but Primary key of the entity.