<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Why getService() Method ?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=3708949" />
  <subtitle>Why getService() Method ?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=3708949</id>
  <updated>2026-05-04T20:26:55Z</updated>
  <dc:date>2026-05-04T20:26:55Z</dc:date>
  <entry>
    <title>RE: Why getService() Method ?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3717949" />
    <author>
      <name>Tomáš Polešovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3717949</id>
    <updated>2009-08-04T09:01:16Z</updated>
    <published>2009-08-04T09:01:16Z</published>
    <summary type="html">Hi.&lt;br /&gt;&lt;br /&gt;In most cases there is no difference, generated *Util.method() is just shortcut for *Util.getService().method(). &lt;br /&gt;&lt;br /&gt;I saw some *Utils&amp;#39; methods that don&amp;#39;t follow this structure, but all *Util classes that are generated using ServiceBuilder should call spring service in the same (this) way.</summary>
    <dc:creator>Tomáš Polešovský</dc:creator>
    <dc:date>2009-08-04T09:01:16Z</dc:date>
  </entry>
  <entry>
    <title>Why getService() Method ?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3708948" />
    <author>
      <name>Masroor Khan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=3708948</id>
    <updated>2009-08-03T05:26:35Z</updated>
    <published>2009-08-03T05:26:35Z</published>
    <summary type="html">Hi ,&lt;br /&gt;&lt;br /&gt;I am using this line of code,  it&amp;#39;s  working fine&lt;br /&gt;&lt;br /&gt;School list =	SchoolLocalServiceUtil.secretPinValidation(secretPin);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if  i am using this line of code,  it&amp;#39;s also working fine&lt;br /&gt;&lt;br /&gt;School list =	SchoolLocalServiceUtil.getService().secretPinValidation(secretPin);&lt;br /&gt;&lt;br /&gt;I want to know what is the difference b/w with getService() method and without getService() method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks .............</summary>
    <dc:creator>Masroor Khan</dc:creator>
    <dc:date>2009-08-03T05:26:35Z</dc:date>
  </entry>
</feed>
